[libwnck/wip/muktupavels/icons: 1/5] screen: store WnckHandle in struct
- From: Alberts Muktupāvels <muktupavels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libwnck/wip/muktupavels/icons: 1/5] screen: store WnckHandle in struct
- Date: Sun, 26 Dec 2021 14:47:22 +0000 (UTC)
commit a886961c98db21eb47e95b9f5223f7788ab70e57
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date: Sun Dec 26 15:32:44 2021 +0200
screen: store WnckHandle in struct
Before 5ab809143a7d commit event filter was added in wnck_screen_get
when constructing first screen. Store WnckHandle in WnckScreen struct
to ensure that event filter is always added otherwise we might end up
without event filter if on startup nothing calls _wnck_get_handle.
This change introduces new requirement - wnck_set_client_type must be
used before using WnckScreen APIs.
libwnck/screen.c | 4 ++++
1 file changed, 4 insertions(+)
---
diff --git a/libwnck/screen.c b/libwnck/screen.c
index d6db387..748ffc7 100644
--- a/libwnck/screen.c
+++ b/libwnck/screen.c
@@ -69,6 +69,8 @@ static WnckScreen** screens = NULL;
struct _WnckScreenPrivate
{
+ WnckHandle *handle;
+
int number;
Window xroot;
Screen *xscreen;
@@ -529,6 +531,8 @@ wnck_screen_construct (Display *display,
WnckScreen *screen,
int number)
{
+ screen->priv->handle = _wnck_get_handle ();
+
/* Create the initial state of the screen. */
screen->priv->xroot = RootWindow (display, number);
screen->priv->xscreen = ScreenOfDisplay (display, number);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]