Author: olivier
Date: 2008-09-10 16:07:00 +0000 (Wed, 10 Sep 2008)
New Revision: 27803
Modified:
xfwm4/trunk/src/compositor.c
Log:
Revert to the previous behaviour, do not allocate extents if the window is not
visible (Bug #4363)
Modified: xfwm4/trunk/src/compositor.c
===================================================================
--- xfwm4/trunk/src/compositor.c 2008-09-10 16:03:37 UTC (rev 27802)
+++ xfwm4/trunk/src/compositor.c 2008-09-10 16:07:00 UTC (rev 27803)
@@ -2056,11 +2056,17 @@
display_info = screen_info->display_info;
damage = None;
- if (cw->extents)
+ if (WIN_IS_VISIBLE(cw))
{
damage = XFixesCreateRegion (display_info->dpy, NULL, 0);
- XFixesCopyRegion (display_info->dpy, damage, cw->extents);
+ if (cw->extents)
+ {
+ XFixesCopyRegion (display_info->dpy, damage, cw->extents);
+ }
+ }
+ if (cw->extents)
+ {
XFixesDestroyRegion (display_info->dpy, cw->extents);
cw->extents = None;
}
@@ -2109,19 +2115,15 @@
cw->attr.height = height;
cw->attr.border_width = bw;
- cw->extents = win_extents (cw);
if (damage)
{
+ cw->extents = win_extents (cw);
XFixesUnionRegion (display_info->dpy, damage, damage, cw->extents);
+
+ fix_region (cw, damage);
+ /* damage region will be destroyed by add_damage () */
+ add_damage (screen_info, damage);
}
- else
- {
- damage = XFixesCreateRegion (display_info->dpy, NULL, 0);
- XFixesCopyRegion (display_info->dpy, damage, cw->extents);
- }
- fix_region (cw, damage);
- /* damage region will be destroyed by add_damage () */
- add_damage (screen_info, damage);
}
static void
@@ -2139,11 +2141,17 @@
damage = None;
- if (cw->extents)
+ if (WIN_IS_VISIBLE(cw))
{
damage = XFixesCreateRegion (display_info->dpy, NULL, 0);
- XFixesCopyRegion (display_info->dpy, damage, cw->extents);
+ if (cw->extents)
+ {
+ XFixesCopyRegion (display_info->dpy, damage, cw->extents);
+ }
+ }
+ if (cw->extents)
+ {
XFixesDestroyRegion (display_info->dpy, cw->extents);
cw->extents = None;
}
@@ -2166,19 +2174,19 @@
cw->clientSize = None;
}
- cw->extents = win_extents (cw);
if (damage)
{
+ cw->extents = win_extents (cw);
XFixesUnionRegion (display_info->dpy, damage, damage, cw->extents);
+
+ /* A shape notify will likely change the shadows too, so clear the
extents */
+ XFixesDestroyRegion (display_info->dpy, cw->extents);
+ cw->extents = None;
+
+ fix_region (cw, damage);
+ /* damage region will be destroyed by add_damage () */
+ add_damage (screen_info, damage);
}
- else
- {
- damage = XFixesCreateRegion (display_info->dpy, NULL, 0);
- XFixesCopyRegion (display_info->dpy, damage, cw->extents);
- }
- fix_region (cw, damage);
- /* damage region will be destroyed by add_damage () */
- add_damage (screen_info, damage);
}
static void
_______________________________________________
Xfce4-commits mailing list
[email protected]
http://foo-projects.org/mailman/listinfo/xfce4-commits