From 5b3d19e42da5bf1a988557b7dff8ef5a00d62f3e Mon Sep 17 00:00:00 2001 From: Matthias Ettrich Date: Tue, 2 Nov 1999 15:17:15 +0000 Subject: [PATCH] make it work again svn path=/trunk/kdebase/kwin/; revision=32597 --- client.cpp | 39 ++++++++++++++++++++------------------- workspace.cpp | 2 ++ 2 files changed, 22 insertions(+), 19 deletions(-) diff --git a/client.cpp b/client.cpp index 4ae5ba4fd1..45bd8b3d8b 100644 --- a/client.cpp +++ b/client.cpp @@ -263,25 +263,25 @@ WindowWrapper::WindowWrapper( WId w, Client *parent, const char* name) XReparentWindow( qt_xdisplay(), win, winId(), 0, 0 ); // // overwrite Qt-defaults because we need SubstructureNotifyMask -// XSelectInput( qt_xdisplay(), winId(), -// KeyPressMask | KeyReleaseMask | -// ButtonPressMask | ButtonReleaseMask | -// KeymapStateMask | -// ButtonMotionMask | -// PointerMotionMask | // need this, too! -// EnterWindowMask | LeaveWindowMask | -// FocusChangeMask | -// ExposureMask | -// StructureNotifyMask | -// SubstructureRedirectMask | -// SubstructureNotifyMask -// ); - - XSelectInput( qt_xdisplay(), w, - FocusChangeMask | - PropertyChangeMask | - StructureNotifyMask - ); + XSelectInput( qt_xdisplay(), winId(), + KeyPressMask | KeyReleaseMask | + ButtonPressMask | ButtonReleaseMask | + KeymapStateMask | + ButtonMotionMask | + PointerMotionMask | // need this, too! + EnterWindowMask | LeaveWindowMask | + FocusChangeMask | + ExposureMask | + StructureNotifyMask | + SubstructureRedirectMask | + SubstructureNotifyMask + ); + + XSelectInput( qt_xdisplay(), w, + FocusChangeMask | + PropertyChangeMask | + StructureNotifyMask + ); // install a passive grab to catch mouse button events @@ -343,6 +343,7 @@ void WindowWrapper::releaseWindow() ((Client*)parentWidget())->workspace()->rootWin(), parentWidget()->x(), parentWidget()->y() ); + XRemoveFromSaveSet(qt_xdisplay(), win ); invalidateWindow(); } diff --git a/workspace.cpp b/workspace.cpp index 31c8576ae8..9497673f8f 100644 --- a/workspace.cpp +++ b/workspace.cpp @@ -131,7 +131,9 @@ void Workspace::init() Workspace::~Workspace() { for ( ClientList::ConstIterator it = clients.begin(); it != clients.end(); ++it) { + WId win = (*it)->window(); delete (*it); + XMapWindow( qt_xdisplay(), win ); } delete tab_box; delete popup;