Skip to content
Snippets Groups Projects
Commit 1eb44047 authored by Olivier Fourdan's avatar Olivier Fourdan :tools: Committed by Olivier Fourdan
Browse files

More XError traps

Add more XError traps related to XConfigureWindow requests.

xfce/xfwm4#405


Signed-off-by: default avatarOlivier Fourdan <fourdan@xfce.org>
(cherry picked from commit ec3b1b12)
parent 6811b602
No related branches found
No related tags found
1 merge request!6Backports fixes from master
......@@ -149,6 +149,9 @@ void
xfwmWindowShow (xfwmWindow * win, int x, int y, int width, int height,
gboolean refresh)
{
ScreenInfo *screen_info;
DisplayInfo *display_info;
TRACE ("win %p (0x%lx) at (%i,%i) [%i×%i]", win, win->window, x, y, width, height);
if (!(win->window))
......@@ -160,9 +163,14 @@ xfwmWindowShow (xfwmWindow * win, int x, int y, int width, int height,
xfwmWindowHide (win);
return;
}
screen_info = win->screen_info;
display_info = screen_info->display_info;
myDisplayErrorTrapPush (display_info);
if (!(win->map))
{
XMapWindow (myScreenGetXDisplay (win->screen_info),
XMapWindow (myScreenGetXDisplay (screen_info),
win->window);
win->map = TRUE;
}
......@@ -170,7 +178,7 @@ xfwmWindowShow (xfwmWindow * win, int x, int y, int width, int height,
if (((x != win->x) || (y != win->y)) && ((width != win->width)
|| (height != win->height)))
{
XMoveResizeWindow (myScreenGetXDisplay (win->screen_info),
XMoveResizeWindow (myScreenGetXDisplay (screen_info),
win->window, x, y,
(unsigned int) width,
(unsigned int) height);
......@@ -181,12 +189,12 @@ xfwmWindowShow (xfwmWindow * win, int x, int y, int width, int height,
}
else if ((x != win->x) || (y != win->y))
{
XMoveWindow (myScreenGetXDisplay (win->screen_info),
XMoveWindow (myScreenGetXDisplay (screen_info),
win->window,
x, y);
if (refresh)
{
XClearWindow (myScreenGetXDisplay (win->screen_info),
XClearWindow (myScreenGetXDisplay (screen_info),
win->window);
}
win->x = x;
......@@ -194,7 +202,7 @@ xfwmWindowShow (xfwmWindow * win, int x, int y, int width, int height,
}
else if ((width != win->width) || (height != win->height))
{
XResizeWindow (myScreenGetXDisplay (win->screen_info),
XResizeWindow (myScreenGetXDisplay (screen_info),
win->window,
(unsigned int) width,
(unsigned int) height);
......@@ -203,9 +211,10 @@ xfwmWindowShow (xfwmWindow * win, int x, int y, int width, int height,
}
else if (refresh)
{
XClearWindow (myScreenGetXDisplay (win->screen_info),
XClearWindow (myScreenGetXDisplay (screen_info),
win->window);
}
myDisplayErrorTrapPopIgnored (display_info);
}
void
......@@ -246,6 +255,10 @@ xfwmWindowTemp (ScreenInfo *screen_info, Visual *visual,
gboolean bottom)
{
XSetWindowAttributes attributes;
DisplayInfo *display_info;
display_info = screen_info->display_info;
myDisplayErrorTrapPush (display_info);
attributes.event_mask = eventmask;
attributes.override_redirect = TRUE;
......@@ -276,6 +289,7 @@ xfwmWindowTemp (ScreenInfo *screen_info, Visual *visual,
screen_info->display_info->dpy,
win->window, eventmask);
#endif
myDisplayErrorTrapPopIgnored (display_info);
}
#ifdef HAVE_RENDER
......
......@@ -72,7 +72,9 @@ clientApplyStackList (ScreenInfo *screen_info)
}
}
myDisplayErrorTrapPush (screen_info->display_info);
XRestackWindows (myScreenGetXDisplay (screen_info), xwinstack, (int) nwindows + 4);
myDisplayErrorTrapPopIgnored (screen_info->display_info);
g_free (xwinstack);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment