[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,
};
void waylandActivationRequest(void)
void waylandActivationRequestActivation(void)
{
if (!wlWm.xdgActivation) return;

View File

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

View File

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

View File

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

View File

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