[PATCH 4/7] Store RootWindow in global_screen structure
Mathieu OTHACEHE <[email protected]> Wed, 7 Dec 2016 10:03:55 +0100
| Newsgroups | gmane.comp.window-managers.ratpoison.devel |
|---|---|
| Message-ID | <[email protected]> |
Every screen stores a copy of xrandr RootWindow even if they all share
the same RootWindow.
This patch stores the RootWindow in a global location for all
screens. Further work is required to remove RootWindow from per screen
structure.
---
src/data.h | 1 +
src/screen.c | 1 +
2 files changed, 2 insertions(+)
diff --git a/src/data.h b/src/data.h
index 08f1667..3975955 100644
--- a/src/data.h
+++ b/src/data.h
@@ -152,6 +152,7 @@ struct rp_group
struct rp_global_screen
{
+ Window root;
unsigned long fg_color, bg_color, fw_color, bw_color; /* The pixel color. */
/* This numset is responsible for giving out numbers for each screen */
diff --git a/src/screen.c b/src/screen.c
index b9bb696..0d45701 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -236,6 +236,7 @@ init_global_screen (rp_global_screen *s)
int screen_num;
screen_num = DefaultScreen (dpy);
+ s->root = RootWindow (dpy, screen_num);
s->numset = numset_new ();
s->fg_color = BlackPixel (dpy, screen_num);
--
2.10.0