[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[RP] [PATCH 4/7] Store RootWindow in global_screen structure
From: |
Mathieu OTHACEHE |
Subject: |
[RP] [PATCH 4/7] Store RootWindow in global_screen structure |
Date: |
Wed, 7 Dec 2016 10:03:55 +0100 |
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
- [RP] [PATCH 0/7] Add xrandr primary screen support, Mathieu OTHACEHE, 2016/12/07
- [RP] [PATCH 2/7] Move function declaration to the right header, Mathieu OTHACEHE, 2016/12/07
- [RP] [PATCH 1/7] Remove useless argument from is_rp_window_for_screen function, Mathieu OTHACEHE, 2016/12/07
- [RP] [PATCH 4/7] Store RootWindow in global_screen structure,
Mathieu OTHACEHE <=
- [RP] [PATCH 5/7] Add a function to find a screen matching a given XWindowAttributes, Mathieu OTHACEHE, 2016/12/07
- [RP] [PATCH 3/7] Add primary screen detection, Mathieu OTHACEHE, 2016/12/07
- [RP] [PATCH 7/7] Select xrandr primary screen at startup if possible, Mathieu OTHACEHE, 2016/12/07
- [RP] [PATCH 6/7] Simplify scanwins function, Mathieu OTHACEHE, 2016/12/07
- Re: [RP] [PATCH 0/7] Add xrandr primary screen support, Jeremie Courreges-Anglas, 2016/12/09