1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
From: Mark Tiefenbruck <mark@fluxbox.org>
Date: Thu, 25 Jan 2007 20:05:02 +0000 (-0500)
Subject: Bug #9762: Fix opacity changes on unmapped windows.
X-Git-Url: http://gitweb.freedesktop.org/?p=xorg/app/xcompmgr.git;a=commitdiff;h=08c9ac6cbb3405cfa4f0b60d7014c734a1990047
Bug #9762: Fix opacity changes on unmapped windows.
---
--- a/xcompmgr.c
+++ b/xcompmgr.c
@@ -1165,6 +1165,9 @@ repair_win (Display *dpy, win *w)
w->damaged = 1;
}
+static unsigned int
+get_opacity_prop (Display *dpy, win *w, unsigned int def);
+
static void
map_win (Display *dpy, Window id, unsigned long sequence, Bool fade)
{
@@ -1179,6 +1182,10 @@ map_win (Display *dpy, Window id, unsign
/* This needs to be here or else we lose transparency messages */
XSelectInput (dpy, id, PropertyChangeMask);
+ /* This needs to be here since we don't get PropertyNotify when unmapped */
+ w->opacity = get_opacity_prop (dpy, w, OPAQUE);
+ determine_mode (dpy, w);
+
#if CAN_DO_USABLE
w->damage_bounds.x = w->damage_bounds.y = 0;
w->damage_bounds.width = w->damage_bounds.height = 0;
@@ -1467,10 +1474,7 @@ add_win (Display *dpy, Window id, Window
new->borderClip = None;
new->prev_trans = 0;
- /* moved mode setting to one place */
- new->opacity = get_opacity_prop (dpy, new, OPAQUE);
new->windowType = determine_wintype (dpy, new->id);
- determine_mode (dpy, new);
new->next = *p;
*p = new;
|