Since Workspace::workspaceEvent() now checks also for windowwrapper
and frame events, it's not necessary to handle them specially there. Also move DestroyNotify handling to windowEvent(). svn path=/trunk/kdebase/kwin/; revision=252355
This commit is contained in:
parent
c433d78a51
commit
84dc01a473
2 changed files with 14 additions and 30 deletions
1
client.h
1
client.h
|
@ -284,6 +284,7 @@ class Client : public QObject, public KDecorationDefines
|
||||||
// handlers for X11 events
|
// handlers for X11 events
|
||||||
void mapRequestEvent( XMapRequestEvent* e );
|
void mapRequestEvent( XMapRequestEvent* e );
|
||||||
void unmapNotifyEvent( XUnmapEvent*e );
|
void unmapNotifyEvent( XUnmapEvent*e );
|
||||||
|
void destroyNotifyEvent( XDestroyWindowEvent*e );
|
||||||
void configureRequestEvent( XConfigureRequestEvent* e );
|
void configureRequestEvent( XConfigureRequestEvent* e );
|
||||||
void propertyNotifyEvent( XPropertyEvent* e );
|
void propertyNotifyEvent( XPropertyEvent* e );
|
||||||
void clientMessageEvent( XClientMessageEvent* e );
|
void clientMessageEvent( XClientMessageEvent* e );
|
||||||
|
|
43
events.cpp
43
events.cpp
|
@ -239,17 +239,6 @@ bool Workspace::workspaceEvent( XEvent * e )
|
||||||
|
|
||||||
case UnmapNotify:
|
case UnmapNotify:
|
||||||
{
|
{
|
||||||
// this is special due to
|
|
||||||
// SubstructureNotifyMask. e->xany.window is the window the
|
|
||||||
// event is reported to. Take care not to confuse Qt.
|
|
||||||
Client* c = findClient( WindowMatchPredicate( e->xunmap.window ));
|
|
||||||
|
|
||||||
if ( c )
|
|
||||||
{
|
|
||||||
c->windowEvent( e );
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
// check for system tray windows
|
// check for system tray windows
|
||||||
if ( removeSystemTrayWin( e->xunmap.window ) )
|
if ( removeSystemTrayWin( e->xunmap.window ) )
|
||||||
{
|
{
|
||||||
|
@ -282,10 +271,6 @@ bool Workspace::workspaceEvent( XEvent * e )
|
||||||
|
|
||||||
case ReparentNotify:
|
case ReparentNotify:
|
||||||
{
|
{
|
||||||
Client* c = findClient( WindowMatchPredicate( e->xreparent.window ));
|
|
||||||
if ( c )
|
|
||||||
(void) c->windowEvent( e );
|
|
||||||
|
|
||||||
//do not confuse Qt with these events. After all, _we_ are the
|
//do not confuse Qt with these events. After all, _we_ are the
|
||||||
//window manager who does the reparenting.
|
//window manager who does the reparenting.
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
@ -294,12 +279,6 @@ bool Workspace::workspaceEvent( XEvent * e )
|
||||||
{
|
{
|
||||||
if ( removeSystemTrayWin( e->xdestroywindow.window ) )
|
if ( removeSystemTrayWin( e->xdestroywindow.window ) )
|
||||||
return TRUE;
|
return TRUE;
|
||||||
Client* c = findClient( WindowMatchPredicate( e->xdestroywindow.window ));
|
|
||||||
if( c != NULL )
|
|
||||||
{
|
|
||||||
c->destroyClient();
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
case MapRequest:
|
case MapRequest:
|
||||||
|
@ -365,13 +344,7 @@ bool Workspace::workspaceEvent( XEvent * e )
|
||||||
}
|
}
|
||||||
case ConfigureRequest:
|
case ConfigureRequest:
|
||||||
{
|
{
|
||||||
Client* c = findClient( WindowMatchPredicate( e->xconfigurerequest.window ));
|
if ( e->xconfigurerequest.parent == root )
|
||||||
if ( c )
|
|
||||||
{
|
|
||||||
c->windowEvent( e );
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
else if ( e->xconfigurerequest.parent == root )
|
|
||||||
{
|
{
|
||||||
XWindowChanges wc;
|
XWindowChanges wc;
|
||||||
unsigned int value_mask = 0;
|
unsigned int value_mask = 0;
|
||||||
|
@ -469,10 +442,12 @@ void Client::windowEvent( XEvent* e )
|
||||||
{
|
{
|
||||||
case UnmapNotify:
|
case UnmapNotify:
|
||||||
return unmapNotifyEvent( &e->xunmap );
|
return unmapNotifyEvent( &e->xunmap );
|
||||||
|
case DestroyNotify:
|
||||||
|
return destroyNotifyEvent( &e->xdestroywindow );
|
||||||
case MapRequest:
|
case MapRequest:
|
||||||
return mapRequestEvent( &e->xmaprequest );
|
return mapRequestEvent( &e->xmaprequest );
|
||||||
case ConfigureRequest:
|
case ConfigureRequest:
|
||||||
return configureRequestEvent( &e->xconfigurerequest );
|
return configureRequestEvent( &e->xconfigurerequest );
|
||||||
case PropertyNotify:
|
case PropertyNotify:
|
||||||
return propertyNotifyEvent( &e->xproperty );
|
return propertyNotifyEvent( &e->xproperty );
|
||||||
case KeyPress:
|
case KeyPress:
|
||||||
|
@ -616,6 +591,14 @@ void Client::unmapNotifyEvent( XUnmapEvent* e )
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Client::destroyNotifyEvent( XDestroyWindowEvent* e )
|
||||||
|
{
|
||||||
|
if( e->window != window())
|
||||||
|
return;
|
||||||
|
destroyClient();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
bool blockAnimation = FALSE;
|
bool blockAnimation = FALSE;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
|
Loading…
Reference in a new issue