From f69216c64458e28e3bce3e2b294803336f4eeff5 Mon Sep 17 00:00:00 2001 From: tpearson Date: Fri, 9 Sep 2011 18:43:10 +0000 Subject: Fix kompmgr crash on window resize git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1252372 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kwin/kompmgr/kompmgr.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'kwin') diff --git a/kwin/kompmgr/kompmgr.c b/kwin/kompmgr/kompmgr.c index 6044c8300..64ddce408 100644 --- a/kwin/kompmgr/kompmgr.c +++ b/kwin/kompmgr/kompmgr.c @@ -1092,7 +1092,7 @@ paint_root (Display *dpy) static XserverRegion win_extents (Display *dpy, win *w) { - XRectangle r; + XRectangle r; r.x = w->a.x; r.y = w->a.y; @@ -1761,6 +1761,7 @@ map_win (Display *dpy, Window id, unsigned long sequence, Bool fade) determine_mode (dpy, w); w->windowType = determine_wintype (dpy, w->id, w->id); + if ((w->windowType < 0) || (w->windowType > NUM_WINTYPES)) w->windowType = WINTYPE_NORMAL; #if 0 printf("window 0x%x type %s\n", w->id, wintype_name(w->windowType)); #endif @@ -2267,6 +2268,9 @@ add_win (Display *dpy, Window id, Window prev) new->decoHash = 0; new->show_root_tile = determine_window_transparent_to_desktop(dpy, id); + new->windowType = determine_wintype (dpy, new->id, new->id); + if ((new->windowType < 0) || (new->windowType > NUM_WINTYPES)) new->windowType = WINTYPE_NORMAL; + new->borderClip = None; new->prev_trans = 0; -- cgit v1.2.1