These I'm also sure should be globalShortcuts(). Last up are the client actions.
svn path=/trunk/KDE/kdebase/workspace/; revision=599655icc-effect-5.14.5
parent
2ec9782f26
commit
bc4375ca2a
|
@ -61,30 +61,30 @@ QMenu* Workspace::clientPopup()
|
||||||
|
|
||||||
mKeepAboveOpAction = advanced_popup->addAction( i18n("Keep &Above Others") );
|
mKeepAboveOpAction = advanced_popup->addAction( i18n("Keep &Above Others") );
|
||||||
mKeepAboveOpAction->setIcon( SmallIconSet( "up" ) );
|
mKeepAboveOpAction->setIcon( SmallIconSet( "up" ) );
|
||||||
mKeepAboveOpAction->setShortcut( keys->action("Window Above Other Windows")->shortcut() );
|
mKeepAboveOpAction->setShortcut( keys->action("Window Above Other Windows")->globalShortcut() );
|
||||||
mKeepAboveOpAction->setCheckable( true );
|
mKeepAboveOpAction->setCheckable( true );
|
||||||
mKeepAboveOpAction->setData( Options::KeepAboveOp );
|
mKeepAboveOpAction->setData( Options::KeepAboveOp );
|
||||||
|
|
||||||
mKeepBelowOpAction = advanced_popup->addAction( i18n("Keep &Below Others") );
|
mKeepBelowOpAction = advanced_popup->addAction( i18n("Keep &Below Others") );
|
||||||
mKeepBelowOpAction->setIcon( SmallIconSet( "down" ) );
|
mKeepBelowOpAction->setIcon( SmallIconSet( "down" ) );
|
||||||
mKeepBelowOpAction->setShortcut( keys->action("Window Below Other Windows")->shortcut() );
|
mKeepBelowOpAction->setShortcut( keys->action("Window Below Other Windows")->globalShortcut() );
|
||||||
mKeepBelowOpAction->setCheckable( true );
|
mKeepBelowOpAction->setCheckable( true );
|
||||||
mKeepBelowOpAction->setData( Options::KeepBelowOp );
|
mKeepBelowOpAction->setData( Options::KeepBelowOp );
|
||||||
|
|
||||||
mFullScreenOpAction = advanced_popup->addAction( i18n("&Fullscreen") );
|
mFullScreenOpAction = advanced_popup->addAction( i18n("&Fullscreen") );
|
||||||
mFullScreenOpAction->setIcon( SmallIconSet( "window_fullscreen" ) );
|
mFullScreenOpAction->setIcon( SmallIconSet( "window_fullscreen" ) );
|
||||||
mFullScreenOpAction->setShortcut( keys->action("Window Fullscreen")->shortcut() );
|
mFullScreenOpAction->setShortcut( keys->action("Window Fullscreen")->globalShortcut() );
|
||||||
mFullScreenOpAction->setCheckable( true );
|
mFullScreenOpAction->setCheckable( true );
|
||||||
mFullScreenOpAction->setData( Options::FullScreenOp );
|
mFullScreenOpAction->setData( Options::FullScreenOp );
|
||||||
|
|
||||||
mNoBorderOpAction = advanced_popup->addAction( i18n("&No Border") );
|
mNoBorderOpAction = advanced_popup->addAction( i18n("&No Border") );
|
||||||
mNoBorderOpAction->setShortcut( keys->action("Window No Border")->shortcut() );
|
mNoBorderOpAction->setShortcut( keys->action("Window No Border")->globalShortcut() );
|
||||||
mNoBorderOpAction->setCheckable( true );
|
mNoBorderOpAction->setCheckable( true );
|
||||||
mNoBorderOpAction->setData( Options::NoBorderOp );
|
mNoBorderOpAction->setData( Options::NoBorderOp );
|
||||||
|
|
||||||
QAction *action = advanced_popup->addAction( i18n("Window &Shortcut...") );
|
QAction *action = advanced_popup->addAction( i18n("Window &Shortcut...") );
|
||||||
action->setIcon( SmallIconSet("key_bindings") );
|
action->setIcon( SmallIconSet("key_bindings") );
|
||||||
action->setShortcut( keys->action("Setup Window Shortcut")->shortcut() );
|
action->setShortcut( keys->action("Setup Window Shortcut")->globalShortcut() );
|
||||||
action->setData( Options::SetupWindowShortcutOp );
|
action->setData( Options::SetupWindowShortcutOp );
|
||||||
|
|
||||||
action = advanced_popup->addAction( i18n("&Special Window Settings...") );
|
action = advanced_popup->addAction( i18n("&Special Window Settings...") );
|
||||||
|
@ -123,24 +123,24 @@ QMenu* Workspace::clientPopup()
|
||||||
|
|
||||||
mMoveOpAction = popup->addAction( i18n("&Move") );
|
mMoveOpAction = popup->addAction( i18n("&Move") );
|
||||||
mMoveOpAction->setIcon( SmallIconSet( "move" ) );
|
mMoveOpAction->setIcon( SmallIconSet( "move" ) );
|
||||||
mMoveOpAction->setShortcut( keys->action("Window Move")->shortcut() );
|
mMoveOpAction->setShortcut( keys->action("Window Move")->globalShortcut() );
|
||||||
mMoveOpAction->setData( Options::MoveOp );
|
mMoveOpAction->setData( Options::MoveOp );
|
||||||
|
|
||||||
mResizeOpAction = popup->addAction( i18n("Re&size") );
|
mResizeOpAction = popup->addAction( i18n("Re&size") );
|
||||||
mResizeOpAction->setShortcut( keys->action("Window Resize")->shortcut() );
|
mResizeOpAction->setShortcut( keys->action("Window Resize")->globalShortcut() );
|
||||||
mResizeOpAction->setData( Options::ResizeOp );
|
mResizeOpAction->setData( Options::ResizeOp );
|
||||||
|
|
||||||
mMinimizeOpAction = popup->addAction( i18n("Mi&nimize") );
|
mMinimizeOpAction = popup->addAction( i18n("Mi&nimize") );
|
||||||
mMinimizeOpAction->setShortcut( keys->action("Window Minimize")->shortcut() );
|
mMinimizeOpAction->setShortcut( keys->action("Window Minimize")->globalShortcut() );
|
||||||
mMinimizeOpAction->setData( Options::MinimizeOp );
|
mMinimizeOpAction->setData( Options::MinimizeOp );
|
||||||
|
|
||||||
mMaximizeOpAction = popup->addAction( i18n("Ma&ximize") );
|
mMaximizeOpAction = popup->addAction( i18n("Ma&ximize") );
|
||||||
mMaximizeOpAction->setShortcut( keys->action("Window Maximize")->shortcut() );
|
mMaximizeOpAction->setShortcut( keys->action("Window Maximize")->globalShortcut() );
|
||||||
mMaximizeOpAction->setCheckable( true );
|
mMaximizeOpAction->setCheckable( true );
|
||||||
mMaximizeOpAction->setData( Options::MaximizeOp );
|
mMaximizeOpAction->setData( Options::MaximizeOp );
|
||||||
|
|
||||||
mShadeOpAction = popup->addAction( i18n("Sh&ade") );
|
mShadeOpAction = popup->addAction( i18n("Sh&ade") );
|
||||||
mShadeOpAction->setShortcut( keys->action("Window Shade")->shortcut() );
|
mShadeOpAction->setShortcut( keys->action("Window Shade")->globalShortcut() );
|
||||||
mShadeOpAction->setCheckable( true );
|
mShadeOpAction->setCheckable( true );
|
||||||
mShadeOpAction->setData( Options::ShadeOp );
|
mShadeOpAction->setData( Options::ShadeOp );
|
||||||
|
|
||||||
|
@ -157,7 +157,7 @@ QMenu* Workspace::clientPopup()
|
||||||
|
|
||||||
mCloseOpAction = popup->addAction( i18n("&Close") );
|
mCloseOpAction = popup->addAction( i18n("&Close") );
|
||||||
mCloseOpAction->setIcon( SmallIconSet( "fileclose" ) );
|
mCloseOpAction->setIcon( SmallIconSet( "fileclose" ) );
|
||||||
mCloseOpAction->setShortcut( keys->action("Window Close")->shortcut() );
|
mCloseOpAction->setShortcut( keys->action("Window Close")->globalShortcut() );
|
||||||
mCloseOpAction->setData( Options::CloseOp );
|
mCloseOpAction->setData( Options::CloseOp );
|
||||||
}
|
}
|
||||||
return popup;
|
return popup;
|
||||||
|
|
|
@ -42,9 +42,6 @@ License. See the file "COPYING" for the exact licensing terms.
|
||||||
#include "group.h"
|
#include "group.h"
|
||||||
#include "rules.h"
|
#include "rules.h"
|
||||||
#include "kwinadaptor.h"
|
#include "kwinadaptor.h"
|
||||||
#include "unmanaged.h"
|
|
||||||
#include "scene.h"
|
|
||||||
#include "effects.h"
|
|
||||||
|
|
||||||
#include <X11/extensions/shape.h>
|
#include <X11/extensions/shape.h>
|
||||||
#include <X11/keysym.h>
|
#include <X11/keysym.h>
|
||||||
|
@ -125,8 +122,7 @@ Workspace::Workspace( bool restore )
|
||||||
topmenu_space( NULL ),
|
topmenu_space( NULL ),
|
||||||
set_active_client_recursion( 0 ),
|
set_active_client_recursion( 0 ),
|
||||||
block_stacking_updates( 0 ),
|
block_stacking_updates( 0 ),
|
||||||
forced_global_mouse_grab( false ),
|
forced_global_mouse_grab( false )
|
||||||
damage_region( None )
|
|
||||||
{
|
{
|
||||||
new KWinAdaptor( "org.kde.kwin", "/KWin", QDBusConnection::sessionBus(), this );
|
new KWinAdaptor( "org.kde.kwin", "/KWin", QDBusConnection::sessionBus(), this );
|
||||||
|
|
||||||
|
@ -170,12 +166,10 @@ Workspace::Workspace( bool restore )
|
||||||
ColormapChangeMask |
|
ColormapChangeMask |
|
||||||
SubstructureRedirectMask |
|
SubstructureRedirectMask |
|
||||||
SubstructureNotifyMask |
|
SubstructureNotifyMask |
|
||||||
FocusChangeMask | // for NotifyDetailNone
|
FocusChangeMask // for NotifyDetailNone
|
||||||
ExposureMask
|
|
||||||
);
|
);
|
||||||
|
|
||||||
Extensions::init();
|
Shape::init();
|
||||||
setupCompositing();
|
|
||||||
|
|
||||||
// compatibility
|
// compatibility
|
||||||
long data = 1;
|
long data = 1;
|
||||||
|
@ -324,7 +318,6 @@ void Workspace::init()
|
||||||
connect(&reconfigureTimer, SIGNAL(timeout()), this,
|
connect(&reconfigureTimer, SIGNAL(timeout()), this,
|
||||||
SLOT(slotReconfigure()));
|
SLOT(slotReconfigure()));
|
||||||
connect( &updateToolWindowsTimer, SIGNAL( timeout()), this, SLOT( slotUpdateToolWindows()));
|
connect( &updateToolWindowsTimer, SIGNAL( timeout()), this, SLOT( slotUpdateToolWindows()));
|
||||||
connect( &compositeTimer, SIGNAL( timeout()), SLOT( compositeTimeout()));
|
|
||||||
|
|
||||||
connect(KGlobalSettings::self(), SIGNAL(appearanceChanged()), this,
|
connect(KGlobalSettings::self(), SIGNAL(appearanceChanged()), this,
|
||||||
SLOT(slotReconfigure()));
|
SLOT(slotReconfigure()));
|
||||||
|
@ -362,11 +355,7 @@ void Workspace::init()
|
||||||
XWindowAttributes attr;
|
XWindowAttributes attr;
|
||||||
XGetWindowAttributes(display(), wins[i], &attr);
|
XGetWindowAttributes(display(), wins[i], &attr);
|
||||||
if (attr.override_redirect )
|
if (attr.override_redirect )
|
||||||
{
|
|
||||||
if( attr.map_state != IsUnmapped && attr.c_class != InputOnly && compositing())
|
|
||||||
createUnmanaged( wins[ i ] );
|
|
||||||
continue;
|
continue;
|
||||||
}
|
|
||||||
if( topmenu_space && topmenu_space->winId() == wins[ i ] )
|
if( topmenu_space && topmenu_space->winId() == wins[ i ] )
|
||||||
continue;
|
continue;
|
||||||
if (attr.map_state != IsUnmapped)
|
if (attr.map_state != IsUnmapped)
|
||||||
|
@ -429,7 +418,6 @@ void Workspace::init()
|
||||||
|
|
||||||
Workspace::~Workspace()
|
Workspace::~Workspace()
|
||||||
{
|
{
|
||||||
finishCompositing();
|
|
||||||
blockStackingUpdates( true );
|
blockStackingUpdates( true );
|
||||||
// TODO grabXServer();
|
// TODO grabXServer();
|
||||||
// use stacking_order, so that kwin --replace keeps stacking order
|
// use stacking_order, so that kwin --replace keeps stacking order
|
||||||
|
@ -441,10 +429,6 @@ Workspace::~Workspace()
|
||||||
(*it)->releaseWindow( true );
|
(*it)->releaseWindow( true );
|
||||||
// no removeClient() is called !
|
// no removeClient() is called !
|
||||||
}
|
}
|
||||||
for( UnmanagedList::ConstIterator it = unmanaged.begin();
|
|
||||||
it != unmanaged.end();
|
|
||||||
++it )
|
|
||||||
(*it)->release();
|
|
||||||
delete desktop_widget;
|
delete desktop_widget;
|
||||||
delete tab_box;
|
delete tab_box;
|
||||||
delete popupinfo;
|
delete popupinfo;
|
||||||
|
@ -488,26 +472,6 @@ Client* Workspace::createClient( Window w, bool is_mapped )
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
addClient( c, Allowed );
|
addClient( c, Allowed );
|
||||||
if( scene )
|
|
||||||
scene->windowAdded( c );
|
|
||||||
if( effects )
|
|
||||||
effects->windowAdded( c );
|
|
||||||
return c;
|
|
||||||
}
|
|
||||||
|
|
||||||
Unmanaged* Workspace::createUnmanaged( Window w )
|
|
||||||
{
|
|
||||||
Unmanaged* c = new Unmanaged( this );
|
|
||||||
if( !c->track( w ))
|
|
||||||
{
|
|
||||||
Unmanaged::deleteUnmanaged( c, Allowed );
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
addUnmanaged( c, Allowed );
|
|
||||||
if( scene )
|
|
||||||
scene->windowAdded( c );
|
|
||||||
if( effects )
|
|
||||||
effects->windowAdded( c );
|
|
||||||
return c;
|
return c;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -550,11 +514,6 @@ void Workspace::addClient( Client* c, allowed_t )
|
||||||
updateToolWindows( true );
|
updateToolWindows( true );
|
||||||
}
|
}
|
||||||
|
|
||||||
void Workspace::addUnmanaged( Unmanaged* c, allowed_t )
|
|
||||||
{
|
|
||||||
unmanaged.append( c );
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Destroys the client \a c
|
Destroys the client \a c
|
||||||
*/
|
*/
|
||||||
|
@ -574,10 +533,6 @@ void Workspace::removeClient( Client* c, allowed_t )
|
||||||
Notify::raise( Notify::Delete );
|
Notify::raise( Notify::Delete );
|
||||||
|
|
||||||
Q_ASSERT( clients.contains( c ) || desktops.contains( c ));
|
Q_ASSERT( clients.contains( c ) || desktops.contains( c ));
|
||||||
if( scene )
|
|
||||||
scene->windowDeleted( c );
|
|
||||||
if( effects )
|
|
||||||
effects->windowDeleted( c );
|
|
||||||
clients.removeAll( c );
|
clients.removeAll( c );
|
||||||
desktops.removeAll( c );
|
desktops.removeAll( c );
|
||||||
unconstrained_stacking_order.removeAll( c );
|
unconstrained_stacking_order.removeAll( c );
|
||||||
|
@ -613,16 +568,6 @@ void Workspace::removeClient( Client* c, allowed_t )
|
||||||
updateClientArea();
|
updateClientArea();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Workspace::removeUnmanaged( Unmanaged* c, allowed_t )
|
|
||||||
{
|
|
||||||
assert( unmanaged.contains( c ));
|
|
||||||
if( scene )
|
|
||||||
scene->windowDeleted( c );
|
|
||||||
if( effects )
|
|
||||||
effects->windowDeleted( c );
|
|
||||||
unmanaged.removeAll( c );
|
|
||||||
}
|
|
||||||
|
|
||||||
void Workspace::updateFocusChains( Client* c, FocusChainChange change )
|
void Workspace::updateFocusChains( Client* c, FocusChainChange change )
|
||||||
{
|
{
|
||||||
if( !c->wantsTabFocus()) // doesn't want tab focus, remove
|
if( !c->wantsTabFocus()) // doesn't want tab focus, remove
|
||||||
|
@ -919,7 +864,7 @@ void Workspace::slotSettingsChanged(int category)
|
||||||
/*!
|
/*!
|
||||||
Reread settings
|
Reread settings
|
||||||
*/
|
*/
|
||||||
KWIN_PROCEDURE( CheckBorderSizesProcedure, Client, cl->checkBorderSizes() );
|
KWIN_PROCEDURE( CheckBorderSizesProcedure, cl->checkBorderSizes() );
|
||||||
|
|
||||||
void Workspace::slotReconfigure()
|
void Workspace::slotReconfigure()
|
||||||
{
|
{
|
||||||
|
@ -977,11 +922,6 @@ void Workspace::slotReconfigure()
|
||||||
updateCurrentTopMenu();
|
updateCurrentTopMenu();
|
||||||
}
|
}
|
||||||
|
|
||||||
if( options->useTranslucency )
|
|
||||||
setupCompositing();
|
|
||||||
else
|
|
||||||
finishCompositing();
|
|
||||||
|
|
||||||
loadWindowRules();
|
loadWindowRules();
|
||||||
for( ClientList::Iterator it = clients.begin();
|
for( ClientList::Iterator it = clients.begin();
|
||||||
it != clients.end();
|
it != clients.end();
|
||||||
|
@ -1682,7 +1622,7 @@ void Workspace::slotGrabWindow()
|
||||||
QPixmap snapshot = QPixmap::grabWindow( active_client->frameId() );
|
QPixmap snapshot = QPixmap::grabWindow( active_client->frameId() );
|
||||||
|
|
||||||
//No XShape - no work.
|
//No XShape - no work.
|
||||||
if( Extensions::shapeAvailable())
|
if( Shape::available())
|
||||||
{
|
{
|
||||||
//As the first step, get the mask from XShape.
|
//As the first step, get the mask from XShape.
|
||||||
int count, order;
|
int count, order;
|
||||||
|
@ -2395,7 +2335,7 @@ void Workspace::helperDialog( const QString& message, const Client* c )
|
||||||
{
|
{
|
||||||
KAction* action = keys->action( "Window Operations Menu" );
|
KAction* action = keys->action( "Window Operations Menu" );
|
||||||
QString shortcut = QString( "%1 (%2)" ).arg( action->text() )
|
QString shortcut = QString( "%1 (%2)" ).arg( action->text() )
|
||||||
.arg( action->shortcut().seq( 0 ).toString());
|
.arg( action->globalShortcut().seq( 0 ).toString());
|
||||||
args << "--msgbox" <<
|
args << "--msgbox" <<
|
||||||
i18n( "You have selected to show a window without its border.\n"
|
i18n( "You have selected to show a window without its border.\n"
|
||||||
"Without the border, you will not be able to enable the border "
|
"Without the border, you will not be able to enable the border "
|
||||||
|
@ -2408,7 +2348,7 @@ void Workspace::helperDialog( const QString& message, const Client* c )
|
||||||
{
|
{
|
||||||
KAction* action = keys->action( "Window Operations Menu" );
|
KAction* action = keys->action( "Window Operations Menu" );
|
||||||
QString shortcut = QString( "%1 (%2)" ).arg( action->text() )
|
QString shortcut = QString( "%1 (%2)" ).arg( action->text() )
|
||||||
.arg( action->shortcut().seq( 0 ).toString());
|
.arg( action->globalShortcut().seq( 0 ).toString());
|
||||||
args << "--msgbox" <<
|
args << "--msgbox" <<
|
||||||
i18n( "You have selected to show a window in fullscreen mode.\n"
|
i18n( "You have selected to show a window in fullscreen mode.\n"
|
||||||
"If the application itself does not have an option to turn the fullscreen "
|
"If the application itself does not have an option to turn the fullscreen "
|
||||||
|
|
Loading…
Reference in New Issue