mirror of
https://github.com/Llewellynvdm/conky.git
synced 2024-12-27 04:32:55 +00:00
Consolidate common X11 XSetWindowAttributes flags
We always specify CWOverrideRedirect. So just assign that to flags once, instead of assigning it to flags in four different cases.
This commit is contained in:
parent
a2b5c3f3cf
commit
cd95b659c7
10
src/x11.cc
10
src/x11.cc
@ -618,7 +618,7 @@ static void init_window(lua::state &l __attribute__((unused)), bool own)
|
||||
|
||||
#ifdef OWN_WINDOW
|
||||
if (own) {
|
||||
int depth = 0, flags;
|
||||
int depth = 0, flags = CWOverrideRedirect;
|
||||
Visual *visual = NULL;
|
||||
|
||||
if (!find_desktop_window(&window.root, &window.desktop)) {
|
||||
@ -654,10 +654,10 @@ static void init_window(lua::state &l __attribute__((unused)), bool own)
|
||||
#ifdef BUILD_ARGB
|
||||
if (have_argb_visual) {
|
||||
attrs.colormap = window.colourmap;
|
||||
flags = CWBorderPixel | CWColormap | CWOverrideRedirect;
|
||||
flags |= CWBorderPixel | CWColormap;
|
||||
} else {
|
||||
#endif /* BUILD_ARGB */
|
||||
flags = CWBackPixel | CWOverrideRedirect;
|
||||
flags |= CWBackPixel;
|
||||
#ifdef BUILD_ARGB
|
||||
}
|
||||
#endif /* BUILD_ARGB */
|
||||
@ -686,10 +686,10 @@ static void init_window(lua::state &l __attribute__((unused)), bool own)
|
||||
#ifdef BUILD_ARGB
|
||||
if (have_argb_visual) {
|
||||
attrs.colormap = window.colourmap;
|
||||
flags = CWBorderPixel | CWColormap | CWOverrideRedirect;
|
||||
flags |= CWBorderPixel | CWColormap;
|
||||
} else {
|
||||
#endif /* BUILD_ARGB */
|
||||
flags = CWBackPixel | CWOverrideRedirect;
|
||||
flags |= CWBackPixel;
|
||||
#ifdef BUILD_ARGB
|
||||
}
|
||||
#endif /* BUILD_ARGB */
|
||||
|
Loading…
Reference in New Issue
Block a user