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 )
|
|
|
|
{
|
2000-05-07 23:05:46 +00:00
|
|
|
return; // seems like knotify is unusable
|
2000-05-07 20:38:11 +00:00
|
|
|
static bool forgetIt = FALSE;
|
|
|
|
if ( forgetIt )
|
|
|
|
return; // no connection was possible, don't try each time
|
|
|
|
|
|
|
|
QString event;
|
|
|
|
switch ( e ) {
|
|
|
|
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-05-07 20:38:11 +00:00
|
|
|
|
|
|
|
|
|
|
|
if ( !KNotifyClient::event( event ) )
|
|
|
|
forgetIt = TRUE;
|
|
|
|
}
|