2000-05-08 04:50:20 +00:00
|
|
|
/*****************************************************************
|
2000-05-07 20:38:11 +00:00
|
|
|
kwin - the KDE window manager
|
|
|
|
|
|
|
|
Copyright (C) 1999, 2000 Matthias Ettrich <ettrich@kde.org>
|
|
|
|
******************************************************************/
|
|
|
|
#include "events.h"
|
|
|
|
#include <knotifyclient.h>
|
|
|
|
|
|
|
|
void Events::raise( Event e )
|
|
|
|
{
|
|
|
|
static bool forgetIt = FALSE;
|
|
|
|
if ( forgetIt )
|
|
|
|
return; // no connection was possible, don't try each time
|
2000-07-17 17:10:00 +00:00
|
|
|
|
2000-05-07 20:38:11 +00:00
|
|
|
QString event;
|
|
|
|
switch ( e ) {
|
2000-08-31 17:20:45 +00:00
|
|
|
case Activate:
|
|
|
|
event = "activate";
|
|
|
|
break;
|
2000-05-07 20:38:11 +00:00
|
|
|
case Close:
|
2000-05-08 04:50:20 +00:00
|
|
|
event = "close";
|
2000-05-07 20:38:11 +00:00
|
|
|
break;
|
|
|
|
case Iconify:
|
2000-05-08 04:50:20 +00:00
|
|
|
event = "iconify";
|
2000-05-07 20:38:11 +00:00
|
|
|
break;
|
|
|
|
case DeIconify:
|
2000-05-08 04:50:20 +00:00
|
|
|
event = "deiconify";
|
2000-05-07 20:38:11 +00:00
|
|
|
break;
|
|
|
|
case Maximize:
|
2000-05-08 04:50:20 +00:00
|
|
|
event = "maximize";
|
2000-05-07 20:38:11 +00:00
|
|
|
break;
|
|
|
|
case UnMaximize:
|
2000-05-08 04:50:20 +00:00
|
|
|
event = "unmaximize";
|
2000-05-07 20:38:11 +00:00
|
|
|
break;
|
|
|
|
case Sticky:
|
2000-05-08 04:50:20 +00:00
|
|
|
event = "sticky";
|
2000-05-07 20:38:11 +00:00
|
|
|
break;
|
|
|
|
case UnSticky:
|
2000-05-08 04:50:20 +00:00
|
|
|
event = "unsticky";
|
2000-05-07 20:38:11 +00:00
|
|
|
break;
|
|
|
|
case New:
|
2000-05-08 04:50:20 +00:00
|
|
|
event = "new";
|
2000-05-07 20:38:11 +00:00
|
|
|
break;
|
|
|
|
case Delete:
|
2000-05-08 04:50:20 +00:00
|
|
|
event = "delete";
|
2000-05-07 20:38:11 +00:00
|
|
|
break;
|
|
|
|
case TransNew:
|
2000-05-08 04:50:20 +00:00
|
|
|
event = "transnew";
|
2000-05-07 20:38:11 +00:00
|
|
|
break;
|
|
|
|
case TransDelete:
|
2000-05-08 04:50:20 +00:00
|
|
|
event = "transdelete";
|
2000-05-07 20:38:11 +00:00
|
|
|
break;
|
|
|
|
case ShadeUp:
|
2000-05-08 04:50:20 +00:00
|
|
|
event = "shadeup";
|
2000-05-07 20:38:11 +00:00
|
|
|
break;
|
|
|
|
case ShadeDown:
|
2000-05-08 04:50:20 +00:00
|
|
|
event = "shadedown";
|
2000-05-07 20:38:11 +00:00
|
|
|
break;
|
|
|
|
case MoveStart:
|
2000-05-08 04:50:20 +00:00
|
|
|
event = "movestart";
|
2000-05-07 20:38:11 +00:00
|
|
|
break;
|
|
|
|
case MoveEnd:
|
2000-05-08 04:50:20 +00:00
|
|
|
event = "moveend";
|
2000-05-07 20:38:11 +00:00
|
|
|
break;
|
|
|
|
case ResizeStart:
|
2000-05-08 04:50:20 +00:00
|
|
|
event = "resizestart";
|
2000-05-07 20:38:11 +00:00
|
|
|
break;
|
|
|
|
case ResizeEnd:
|
2000-05-08 04:50:20 +00:00
|
|
|
event = "resizeend";
|
2000-05-07 20:38:11 +00:00
|
|
|
break;
|
|
|
|
}
|
2000-05-08 04:50:20 +00:00
|
|
|
|
2000-05-08 04:39:12 +00:00
|
|
|
if ( !event )
|
|
|
|
return;
|
2000-05-08 04:50:20 +00:00
|
|
|
|
2000-09-14 03:10:03 +00:00
|
|
|
forgetIt= !KNotifyClient::event( event );
|
2000-05-07 20:38:11 +00:00
|
|
|
}
|