[client] ds: expose activation requesting

This commit is contained in:
Tudor Brindus 2022-02-06 16:20:59 -05:00 committed by Geoffrey McRae
parent 21a349343b
commit da548e3858
5 changed files with 12 additions and 2 deletions

View File

@ -51,7 +51,7 @@ static const struct xdg_activation_token_v1_listener activationTokenListener = {
.done = &activationTokenDone, .done = &activationTokenDone,
}; };
void waylandActivationRequest(void) void waylandActivationRequestActivation(void)
{ {
if (!wlWm.xdgActivation) return; if (!wlWm.xdgActivation) return;

View File

@ -190,6 +190,7 @@ struct LG_DisplayServerOps LGDS_Wayland =
.warpPointer = waylandWarpPointer, .warpPointer = waylandWarpPointer,
.realignPointer = waylandRealignPointer, .realignPointer = waylandRealignPointer,
.isValidPointerPos = waylandIsValidPointerPos, .isValidPointerPos = waylandIsValidPointerPos,
.requestActivation = waylandActivationRequestActivation,
.inhibitIdle = waylandInhibitIdle, .inhibitIdle = waylandInhibitIdle,
.uninhibitIdle = waylandUninhibitIdle, .uninhibitIdle = waylandUninhibitIdle,
.wait = waylandWait, .wait = waylandWait,

View File

@ -237,7 +237,7 @@ extern struct WCBState wlCb;
// activation module // activation module
bool waylandActivationInit(void); bool waylandActivationInit(void);
void waylandActivationFree(void); void waylandActivationFree(void);
void waylandActivationRequest(void); void waylandActivationRequestActivation(void);
// clipboard module // clipboard module
bool waylandCBInit(void); bool waylandCBInit(void);

View File

@ -1813,6 +1813,11 @@ static bool x11IsValidPointerPos(int x, int y)
return ret; return ret;
} }
static void x11RequestActivation(void)
{
// TODO
}
static void x11InhibitIdle(void) static void x11InhibitIdle(void)
{ {
XScreenSaverSuspend(x11.display, true); XScreenSaverSuspend(x11.display, true);
@ -1903,6 +1908,7 @@ struct LG_DisplayServerOps LGDS_X11 =
.warpPointer = x11WarpPointer, .warpPointer = x11WarpPointer,
.realignPointer = x11RealignPointer, .realignPointer = x11RealignPointer,
.isValidPointerPos = x11IsValidPointerPos, .isValidPointerPos = x11IsValidPointerPos,
.requestActivation = x11RequestActivation,
.inhibitIdle = x11InhibitIdle, .inhibitIdle = x11InhibitIdle,
.uninhibitIdle = x11UninhibitIdle, .uninhibitIdle = x11UninhibitIdle,
.wait = x11Wait, .wait = x11Wait,

View File

@ -194,6 +194,9 @@ struct LG_DisplayServerOps
void (*inhibitIdle)(); void (*inhibitIdle)();
void (*uninhibitIdle)(); void (*uninhibitIdle)();
/* called to request activation */
void (*requestActivation)();
/* wait for the specified time without blocking UI processing/event loops */ /* wait for the specified time without blocking UI processing/event loops */
void (*wait)(unsigned int time); void (*wait)(unsigned int time);