diff --git a/CMakeLists.txt b/CMakeLists.txt index 6c3a0c8447..7587544ae0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -100,7 +100,7 @@ if(HAVE_OPENGL) ) endif(HAVE_OPENGL) -qt4_add_dbus_adaptor( kwin_KDEINIT_SRCS org.kde.KWin.xml workspace.h KWinInternal::Workspace ) +qt4_add_dbus_adaptor( kwin_KDEINIT_SRCS org.kde.KWin.xml workspace.h KWin::Workspace ) kde4_automoc(kwin ${kwin_KDEINIT_SRCS}) diff --git a/activation.cpp b/activation.cpp index 7fa770cb23..9ed8179555 100644 --- a/activation.cpp +++ b/activation.cpp @@ -29,9 +29,10 @@ License. See the file "COPYING" for the exact licensing terms. #include "atoms.h" #include "group.h" #include "rules.h" +#include "effects.h" #include -namespace KWinInternal +namespace KWin { /* @@ -221,8 +222,8 @@ void Workspace::setActiveClient( Client* c, allowed_t ) ++set_active_client_recursion; if( active_client != NULL ) { // note that this may call setActiveClient( NULL ), therefore the recursion counter - active_client->setActive( false ); - } + active_client->setActive( false ); + } active_client = c; Q_ASSERT( c == NULL || c->isActive()); if( active_client != NULL ) @@ -245,6 +246,8 @@ void Workspace::setActiveClient( Client* c, allowed_t ) rootInfo->setActiveWindow( active_client? active_client->window() : 0 ); updateColormap(); + if( effects ) + effects->windowActivated( active_client ? active_client->effectWindow() : NULL ); --set_active_client_recursion; } @@ -263,7 +266,6 @@ void Workspace::activateClient( Client* c, bool force ) { if( c == NULL ) { - focusToNull(); setActiveClient( NULL, Allowed ); return; } @@ -698,7 +700,7 @@ void Client::demandAttentionKNotify() } // TODO I probably shouldn't be lazy here and do it without the macro, so that people can read it -KWIN_COMPARE_PREDICATE( SameApplicationActiveHackPredicate, const Client*, +KWIN_COMPARE_PREDICATE( SameApplicationActiveHackPredicate, Client, const Client*, // ignore already existing splashes, toolbars, utilities, menus and topmenus, // as the app may show those before the main window !cl->isSplash() && !cl->isToolbar() && !cl->isTopMenu() && !cl->isUtility() && !cl->isMenu() diff --git a/atoms.cpp b/atoms.cpp index 65cf5fbe34..ddfde44774 100644 --- a/atoms.cpp +++ b/atoms.cpp @@ -15,7 +15,7 @@ License. See the file "COPYING" for the exact licensing terms. #include "utils.h" #include -namespace KWinInternal +namespace KWin { Atoms::Atoms() diff --git a/atoms.h b/atoms.h index 2efd5aa718..2e6776d7c7 100644 --- a/atoms.h +++ b/atoms.h @@ -13,7 +13,7 @@ License. See the file "COPYING" for the exact licensing terms. #define KWIN_ATOMS_H #include -namespace KWinInternal +namespace KWin { class Atoms diff --git a/bridge.cpp b/bridge.cpp index 1ad86f2273..c3ec074693 100644 --- a/bridge.cpp +++ b/bridge.cpp @@ -13,7 +13,7 @@ License. See the file "COPYING" for the exact licensing terms. #include "client.h" #include "options.h" -namespace KWinInternal +namespace KWin { Bridge::Bridge( Client* cl ) @@ -197,9 +197,9 @@ QRegion Bridge::unobscuredRegion( const QRegion& r ) const void Bridge::grabXServer( bool grab ) { if( grab ) - KWinInternal::grabXServer(); + KWin::grabXServer(); else - KWinInternal::ungrabXServer(); + KWin::ungrabXServer(); } } // namespace diff --git a/bridge.h b/bridge.h index 5cc83d3102..d8cfbafcdd 100644 --- a/bridge.h +++ b/bridge.h @@ -13,7 +13,7 @@ License. See the file "COPYING" for the exact licensing terms. #include -namespace KWinInternal +namespace KWin { class Client; diff --git a/client.cpp b/client.cpp index 4b5d6c2706..c2d1fb4c9d 100644 --- a/client.cpp +++ b/client.cpp @@ -38,7 +38,7 @@ License. See the file "COPYING" for the exact licensing terms. // put all externs before the namespace statement to allow the linker // to resolve them properly -namespace KWinInternal +namespace KWin { /* diff --git a/client.h b/client.h index e7f13394ed..2eeb05539a 100644 --- a/client.h +++ b/client.h @@ -34,7 +34,7 @@ class QTimer; class K3Process; class KStartupInfoData; -namespace KWinInternal +namespace KWin { class Workspace; @@ -490,7 +490,7 @@ class GeometryUpdatesBlocker class WinInfo : public NETWinInfo { private: - typedef KWinInternal::Client Client; // because of NET::Client + typedef KWin::Client Client; // because of NET::Client public: WinInfo( Client* c, Display * display, Window window, Window rwin, const unsigned long pr[], int pr_size ); diff --git a/composite.cpp b/composite.cpp index 9e3100b536..abbb0ece4d 100644 --- a/composite.cpp +++ b/composite.cpp @@ -43,7 +43,7 @@ License. See the file "COPYING" for the exact licensing terms. #include -namespace KWinInternal +namespace KWin { //**************************************** diff --git a/deleted.cpp b/deleted.cpp index 4b9193c417..59bf1eb34d 100644 --- a/deleted.cpp +++ b/deleted.cpp @@ -14,7 +14,7 @@ License. See the file "COPYING" for the exact licensing terms. #include "client.h" #include "effects.h" -namespace KWinInternal +namespace KWin { Deleted::Deleted( Workspace* ws ) diff --git a/deleted.h b/deleted.h index de6555c5f9..e486eddc82 100644 --- a/deleted.h +++ b/deleted.h @@ -13,7 +13,7 @@ License. See the file "COPYING" for the exact licensing terms. #include "toplevel.h" -namespace KWinInternal +namespace KWin { class Deleted diff --git a/effects.cpp b/effects.cpp index 5d8127166f..ce0a4a153c 100644 --- a/effects.cpp +++ b/effects.cpp @@ -45,7 +45,7 @@ License. See the file "COPYING" for the exact licensing terms. #include "effects/test_input.h" #include "effects/test_thumbnail.h" -namespace KWinInternal +namespace KWin { //**************************************** @@ -189,7 +189,7 @@ EffectsHandler::EffectsHandler() { if( !compositing()) return; - KWinInternal::effects = this; + KWin::effects = this; #ifdef HAVE_CAPTURY registerEffect("VideoRecord", new GenericEffectFactory); diff --git a/effects.h b/effects.h index a5de86ef09..0f6cc61f68 100644 --- a/effects.h +++ b/effects.h @@ -17,7 +17,7 @@ License. See the file "COPYING" for the exact licensing terms. #include -namespace KWinInternal +namespace KWin { class Toplevel; diff --git a/effects/boxswitch.cpp b/effects/boxswitch.cpp index 4d6d1c9428..0e5101db4d 100644 --- a/effects/boxswitch.cpp +++ b/effects/boxswitch.cpp @@ -21,7 +21,7 @@ License. See the file "COPYING" for the exact licensing terms. #include #endif -namespace KWinInternal +namespace KWin { BoxSwitchEffect::BoxSwitchEffect() diff --git a/effects/boxswitch.h b/effects/boxswitch.h index 57c3ef2e41..6585794422 100644 --- a/effects/boxswitch.h +++ b/effects/boxswitch.h @@ -21,7 +21,7 @@ License. See the file "COPYING" for the exact licensing terms. #include #include -namespace KWinInternal +namespace KWin { class BoxSwitchEffect diff --git a/effects/demo_taskbarthumbnail.cpp b/effects/demo_taskbarthumbnail.cpp index 54ce7a40de..fb29ea95c9 100644 --- a/effects/demo_taskbarthumbnail.cpp +++ b/effects/demo_taskbarthumbnail.cpp @@ -18,7 +18,7 @@ License. See the file "COPYING" for the exact licensing terms. // Note that currently effects need to be manually enabled in the EffectsHandler // class constructor (in effects.cpp). -namespace KWinInternal +namespace KWin { TaskbarThumbnailEffect::TaskbarThumbnailEffect() diff --git a/effects/demo_taskbarthumbnail.h b/effects/demo_taskbarthumbnail.h index 5270bee48a..32cfc20d32 100644 --- a/effects/demo_taskbarthumbnail.h +++ b/effects/demo_taskbarthumbnail.h @@ -15,7 +15,7 @@ License. See the file "COPYING" for the exact licensing terms. #include -namespace KWinInternal +namespace KWin { /** diff --git a/effects/desktopchangeslide.cpp b/effects/desktopchangeslide.cpp index 7466a47ff9..438c2adb26 100644 --- a/effects/desktopchangeslide.cpp +++ b/effects/desktopchangeslide.cpp @@ -12,7 +12,7 @@ License. See the file "COPYING" for the exact licensing terms. #include -namespace KWinInternal +namespace KWin { const int MAX_PROGRESS = 1000; diff --git a/effects/desktopchangeslide.h b/effects/desktopchangeslide.h index 2dd498e8bc..5868b97bbd 100644 --- a/effects/desktopchangeslide.h +++ b/effects/desktopchangeslide.h @@ -13,7 +13,7 @@ License. See the file "COPYING" for the exact licensing terms. #include -namespace KWinInternal +namespace KWin { class DesktopChangeSlideEffect diff --git a/effects/dialogparent.cpp b/effects/dialogparent.cpp index 7375436a25..17707b86a6 100644 --- a/effects/dialogparent.cpp +++ b/effects/dialogparent.cpp @@ -16,7 +16,7 @@ License. See the file "COPYING" for the exact licensing terms. // Note that currently effects need to be manually enabled in the EffectsHandler // class constructor (in effects.cpp). -namespace KWinInternal +namespace KWin { void DialogParentEffect::prePaintWindow( EffectWindow* w, int* mask, QRegion* paint, QRegion* clip, int time ) diff --git a/effects/dialogparent.h b/effects/dialogparent.h index 6df0e52329..677077346d 100644 --- a/effects/dialogparent.h +++ b/effects/dialogparent.h @@ -15,7 +15,7 @@ License. See the file "COPYING" for the exact licensing terms. #include -namespace KWinInternal +namespace KWin { /** diff --git a/effects/drunken.cpp b/effects/drunken.cpp index 194b696e1d..dc86e7cee7 100644 --- a/effects/drunken.cpp +++ b/effects/drunken.cpp @@ -12,7 +12,7 @@ License. See the file "COPYING" for the exact licensing terms. #include -namespace KWinInternal +namespace KWin { void DrunkenEffect::prePaintScreen( int* mask, QRegion* region, int time ) diff --git a/effects/drunken.h b/effects/drunken.h index 7f5ce0fc9f..0eb937f9e1 100644 --- a/effects/drunken.h +++ b/effects/drunken.h @@ -13,7 +13,7 @@ License. See the file "COPYING" for the exact licensing terms. #include -namespace KWinInternal +namespace KWin { class DrunkenEffect diff --git a/effects/explosioneffect.cpp b/effects/explosioneffect.cpp index 4c93cec4bd..900c2ec8d2 100644 --- a/effects/explosioneffect.cpp +++ b/effects/explosioneffect.cpp @@ -23,7 +23,7 @@ License. See the file "COPYING" for the exact licensing terms. #include -namespace KWinInternal +namespace KWin { ExplosionEffect::ExplosionEffect() : Effect() diff --git a/effects/explosioneffect.h b/effects/explosioneffect.h index ef39973760..f8abed2b4a 100644 --- a/effects/explosioneffect.h +++ b/effects/explosioneffect.h @@ -14,7 +14,7 @@ License. See the file "COPYING" for the exact licensing terms. // Include with base class for effects. #include -namespace KWinInternal +namespace KWin { class GLShader; diff --git a/effects/fade.cpp b/effects/fade.cpp index a45e1b1caf..9b30fc3945 100644 --- a/effects/fade.cpp +++ b/effects/fade.cpp @@ -13,7 +13,7 @@ License. See the file "COPYING" for the exact licensing terms. #include #include -namespace KWinInternal +namespace KWin { FadeEffect::FadeEffect() diff --git a/effects/fade.h b/effects/fade.h index 988b15b4b2..7b4ad8a85b 100644 --- a/effects/fade.h +++ b/effects/fade.h @@ -13,7 +13,7 @@ License. See the file "COPYING" for the exact licensing terms. #include -namespace KWinInternal +namespace KWin { class FadeEffect diff --git a/effects/fallapart.cpp b/effects/fallapart.cpp index d786524b00..71d369477f 100644 --- a/effects/fallapart.cpp +++ b/effects/fallapart.cpp @@ -15,7 +15,7 @@ License. See the file "COPYING" for the exact licensing terms. #include #include -namespace KWinInternal +namespace KWin { void FallApartEffect::prePaintScreen( int* mask, QRegion* region, int time ) diff --git a/effects/fallapart.h b/effects/fallapart.h index 7df54816b2..b75ab65c5f 100644 --- a/effects/fallapart.h +++ b/effects/fallapart.h @@ -13,7 +13,7 @@ License. See the file "COPYING" for the exact licensing terms. #include -namespace KWinInternal +namespace KWin { class FallApartEffect diff --git a/effects/flame.cpp b/effects/flame.cpp index e0fb5f3020..3c7041c32c 100644 --- a/effects/flame.cpp +++ b/effects/flame.cpp @@ -13,7 +13,7 @@ License. See the file "COPYING" for the exact licensing terms. #include #include -namespace KWinInternal +namespace KWin { void FlameEffect::prePaintScreen( int* mask, QRegion* region, int time ) diff --git a/effects/flame.h b/effects/flame.h index 7d015c96bc..5fe9e194d9 100644 --- a/effects/flame.h +++ b/effects/flame.h @@ -13,7 +13,7 @@ License. See the file "COPYING" for the exact licensing terms. #include -namespace KWinInternal +namespace KWin { class FlameEffect diff --git a/effects/howto.cpp b/effects/howto.cpp index 5e0550d5bb..d0dad3d1ce 100644 --- a/effects/howto.cpp +++ b/effects/howto.cpp @@ -25,7 +25,7 @@ License. See the file "COPYING" for the exact licensing terms. // Note that currently effects need to be manually enabled in the EffectsHandler // class constructor (in effects.cpp). -namespace KWinInternal +namespace KWin { // A pre-paint function that tells the compositing code how this effect will affect diff --git a/effects/howto.h b/effects/howto.h index 57604b2d1d..3a4605e930 100644 --- a/effects/howto.h +++ b/effects/howto.h @@ -23,7 +23,7 @@ License. See the file "COPYING" for the exact licensing terms. // Everything in KWin is in a namespace. There's no need to prefix names // with KWin or K, there's no (big) need to care about symbol clashes. -namespace KWinInternal +namespace KWin { // The class implementing the effect. diff --git a/effects/maketransparent.cpp b/effects/maketransparent.cpp index c939f76689..123a704e2d 100644 --- a/effects/maketransparent.cpp +++ b/effects/maketransparent.cpp @@ -12,7 +12,7 @@ License. See the file "COPYING" for the exact licensing terms. #include -namespace KWinInternal +namespace KWin { void MakeTransparentEffect::prePaintWindow( EffectWindow* w, int* mask, QRegion* paint, QRegion* clip, int time ) diff --git a/effects/maketransparent.h b/effects/maketransparent.h index e1d7fd81ef..f169ae913f 100644 --- a/effects/maketransparent.h +++ b/effects/maketransparent.h @@ -13,7 +13,7 @@ License. See the file "COPYING" for the exact licensing terms. #include -namespace KWinInternal +namespace KWin { class MakeTransparentEffect diff --git a/effects/minimizeanimation.cpp b/effects/minimizeanimation.cpp index 910aae17ac..9e30ab6e73 100644 --- a/effects/minimizeanimation.cpp +++ b/effects/minimizeanimation.cpp @@ -18,7 +18,7 @@ License. See the file "COPYING" for the exact licensing terms. // Note that currently effects need to be manually enabled in the EffectsHandler // class constructor (in effects.cpp). -namespace KWinInternal +namespace KWin { MinimizeAnimationEffect::MinimizeAnimationEffect() diff --git a/effects/minimizeanimation.h b/effects/minimizeanimation.h index d22f709469..57dbc5c57a 100644 --- a/effects/minimizeanimation.h +++ b/effects/minimizeanimation.h @@ -15,7 +15,7 @@ License. See the file "COPYING" for the exact licensing terms. #include -namespace KWinInternal +namespace KWin { /** diff --git a/effects/presentwindows.cpp b/effects/presentwindows.cpp index 1d857c1d1a..9c39ae79a6 100644 --- a/effects/presentwindows.cpp +++ b/effects/presentwindows.cpp @@ -25,7 +25,7 @@ License. See the file "COPYING" for the exact licensing terms. // Note that currently effects need to be manually enabled in the EffectsHandler // class constructor (in effects.cpp). -namespace KWinInternal +namespace KWin { diff --git a/effects/presentwindows.h b/effects/presentwindows.h index ebd3e9f19c..f3e637bbd5 100644 --- a/effects/presentwindows.h +++ b/effects/presentwindows.h @@ -15,7 +15,7 @@ License. See the file "COPYING" for the exact licensing terms. #include -namespace KWinInternal +namespace KWin { /** diff --git a/effects/scalein.cpp b/effects/scalein.cpp index 0e508bac0b..462069033e 100644 --- a/effects/scalein.cpp +++ b/effects/scalein.cpp @@ -12,7 +12,7 @@ License. See the file "COPYING" for the exact licensing terms. #include -namespace KWinInternal +namespace KWin { void ScaleInEffect::prePaintScreen( int* mask, QRegion* region, int time ) diff --git a/effects/scalein.h b/effects/scalein.h index 2fdec92191..301f52dfa5 100644 --- a/effects/scalein.h +++ b/effects/scalein.h @@ -13,7 +13,7 @@ License. See the file "COPYING" for the exact licensing terms. #include -namespace KWinInternal +namespace KWin { class ScaleInEffect diff --git a/effects/shadow.cpp b/effects/shadow.cpp index b788e9436a..6564cdd6a0 100644 --- a/effects/shadow.cpp +++ b/effects/shadow.cpp @@ -14,7 +14,7 @@ License. See the file "COPYING" for the exact licensing terms. #include #endif -namespace KWinInternal +namespace KWin { ShadowEffect::ShadowEffect() diff --git a/effects/shadow.h b/effects/shadow.h index f6e7ba1601..8b3c2bfd25 100644 --- a/effects/shadow.h +++ b/effects/shadow.h @@ -13,7 +13,7 @@ License. See the file "COPYING" for the exact licensing terms. #include -namespace KWinInternal +namespace KWin { class ShadowEffect diff --git a/effects/shakymove.cpp b/effects/shakymove.cpp index 112b514086..20e821c647 100644 --- a/effects/shakymove.cpp +++ b/effects/shakymove.cpp @@ -12,7 +12,7 @@ License. See the file "COPYING" for the exact licensing terms. #include -namespace KWinInternal +namespace KWin { ShakyMoveEffect::ShakyMoveEffect() diff --git a/effects/shakymove.h b/effects/shakymove.h index 46d1e381c4..7b3cb7dafb 100644 --- a/effects/shakymove.h +++ b/effects/shakymove.h @@ -15,7 +15,7 @@ License. See the file "COPYING" for the exact licensing terms. #include -namespace KWinInternal +namespace KWin { class ShakyMoveEffect diff --git a/effects/shiftworkspaceup.cpp b/effects/shiftworkspaceup.cpp index 35570b5632..da0894821c 100644 --- a/effects/shiftworkspaceup.cpp +++ b/effects/shiftworkspaceup.cpp @@ -12,7 +12,7 @@ License. See the file "COPYING" for the exact licensing terms. #include -namespace KWinInternal +namespace KWin { ShiftWorkspaceUpEffect::ShiftWorkspaceUpEffect() diff --git a/effects/shiftworkspaceup.h b/effects/shiftworkspaceup.h index 613bff7581..92eae6cc76 100644 --- a/effects/shiftworkspaceup.h +++ b/effects/shiftworkspaceup.h @@ -15,7 +15,7 @@ License. See the file "COPYING" for the exact licensing terms. #include -namespace KWinInternal +namespace KWin { class ShiftWorkspaceUpEffect diff --git a/effects/showfps.cpp b/effects/showfps.cpp index 325441b434..896b3d4a96 100644 --- a/effects/showfps.cpp +++ b/effects/showfps.cpp @@ -20,7 +20,7 @@ License. See the file "COPYING" for the exact licensing terms. #include #endif -namespace KWinInternal +namespace KWin { const int FPS_WIDTH = 10; diff --git a/effects/showfps.h b/effects/showfps.h index a8acfce500..e621bd38fd 100644 --- a/effects/showfps.h +++ b/effects/showfps.h @@ -15,7 +15,7 @@ License. See the file "COPYING" for the exact licensing terms. #include -namespace KWinInternal +namespace KWin { class ShowFpsEffect diff --git a/effects/test_input.cpp b/effects/test_input.cpp index c60dfccc8f..9cb99f81e0 100644 --- a/effects/test_input.cpp +++ b/effects/test_input.cpp @@ -24,7 +24,7 @@ License. See the file "COPYING" for the exact licensing terms. #include #include -namespace KWinInternal +namespace KWin { TestInputEffect::TestInputEffect() diff --git a/effects/test_input.h b/effects/test_input.h index eb8307b338..355bf381c3 100644 --- a/effects/test_input.h +++ b/effects/test_input.h @@ -19,7 +19,7 @@ License. See the file "COPYING" for the exact licensing terms. #include -namespace KWinInternal +namespace KWin { class TestInputEffect diff --git a/effects/test_thumbnail.cpp b/effects/test_thumbnail.cpp index f78c08ffd4..40cb61f606 100644 --- a/effects/test_thumbnail.cpp +++ b/effects/test_thumbnail.cpp @@ -17,7 +17,7 @@ License. See the file "COPYING" for the exact licensing terms. #include "test_thumbnail.h" -namespace KWinInternal +namespace KWin { TestThumbnailEffect::TestThumbnailEffect() diff --git a/effects/test_thumbnail.h b/effects/test_thumbnail.h index 7f0115f4ba..439a26201e 100644 --- a/effects/test_thumbnail.h +++ b/effects/test_thumbnail.h @@ -19,7 +19,7 @@ License. See the file "COPYING" for the exact licensing terms. #include -namespace KWinInternal +namespace KWin { class TestThumbnailEffect diff --git a/effects/videorecord.cpp b/effects/videorecord.cpp index 7c07d759fc..7b457ea7fe 100644 --- a/effects/videorecord.cpp +++ b/effects/videorecord.cpp @@ -43,7 +43,7 @@ License. See the file "COPYING" for the exact licensing terms. #include -namespace KWinInternal +namespace KWin { VideoRecordEffect::VideoRecordEffect() diff --git a/effects/videorecord.h b/effects/videorecord.h index 5026b76a30..e2bc5879c0 100644 --- a/effects/videorecord.h +++ b/effects/videorecord.h @@ -15,7 +15,7 @@ License. See the file "COPYING" for the exact licensing terms. #include -namespace KWinInternal +namespace KWin { class VideoRecordEffect diff --git a/effects/wavywindows.cpp b/effects/wavywindows.cpp index 775732019d..b6cfe40437 100644 --- a/effects/wavywindows.cpp +++ b/effects/wavywindows.cpp @@ -21,7 +21,7 @@ License. See the file "COPYING" for the exact licensing terms. // Note that currently effects need to be manually enabled in the EffectsHandler // class constructor (in effects.cpp). -namespace KWinInternal +namespace KWin { WavyWindowsEffect::WavyWindowsEffect() diff --git a/effects/wavywindows.h b/effects/wavywindows.h index 9b452c6860..6b8fa4e247 100644 --- a/effects/wavywindows.h +++ b/effects/wavywindows.h @@ -15,7 +15,7 @@ License. See the file "COPYING" for the exact licensing terms. #include -namespace KWinInternal +namespace KWin { /** diff --git a/effects/zoom.cpp b/effects/zoom.cpp index b10bbfb295..3f5344f310 100644 --- a/effects/zoom.cpp +++ b/effects/zoom.cpp @@ -12,7 +12,7 @@ License. See the file "COPYING" for the exact licensing terms. #include -namespace KWinInternal +namespace KWin { ZoomEffect::ZoomEffect() diff --git a/effects/zoom.h b/effects/zoom.h index 0ebf706e24..1620381744 100644 --- a/effects/zoom.h +++ b/effects/zoom.h @@ -13,7 +13,7 @@ License. See the file "COPYING" for the exact licensing terms. #include -namespace KWinInternal +namespace KWin { class ZoomEffect diff --git a/events.cpp b/events.cpp index 19f913bdb5..c2367462c8 100644 --- a/events.cpp +++ b/events.cpp @@ -34,7 +34,7 @@ License. See the file "COPYING" for the exact licensing terms. #include #include -namespace KWinInternal +namespace KWin { // **************************************** diff --git a/geometry.cpp b/geometry.cpp index b06965120c..69519121f8 100644 --- a/geometry.cpp +++ b/geometry.cpp @@ -32,7 +32,7 @@ License. See the file "COPYING" for the exact licensing terms. #include #include -namespace KWinInternal +namespace KWin { //******************************************** diff --git a/geometrytip.cpp b/geometrytip.cpp index f6109842e8..da5974da7b 100644 --- a/geometrytip.cpp +++ b/geometrytip.cpp @@ -11,7 +11,7 @@ License. See the file "COPYING" for the exact licensing terms. #include "geometrytip.h" #include -namespace KWinInternal +namespace KWin { GeometryTip::GeometryTip( const XSizeHints* xSizeHints, bool save_under ): diff --git a/geometrytip.h b/geometrytip.h index 37abeb5661..40ea5d89cf 100644 --- a/geometrytip.h +++ b/geometrytip.h @@ -14,7 +14,7 @@ License. See the file "COPYING" for the exact licensing terms. #include #include "client.h" -namespace KWinInternal +namespace KWin { class GeometryTip: public QLabel diff --git a/glutils.cpp b/glutils.cpp index 7d37aeef31..7e51c25c2b 100644 --- a/glutils.cpp +++ b/glutils.cpp @@ -20,7 +20,7 @@ License. See the file "COPYING" for the exact licensing terms. #define MAKE_GL_VERSION(major, minor, release) ( ((major) << 16) | ((minor) << 8) | (release) ) -namespace KWinInternal +namespace KWin { // Variables // GL version, use MAKE_GL_VERSION() macro for comparing with a specific version diff --git a/glutils.h b/glutils.h index 39d0275380..7d0fcddf5d 100644 --- a/glutils.h +++ b/glutils.h @@ -27,7 +27,7 @@ License. See the file "COPYING" for the exact licensing terms. template< class K, class V > class QHash; -namespace KWinInternal +namespace KWin { diff --git a/glutils_funcs.cpp b/glutils_funcs.cpp index cc97791413..5d2536c7ac 100644 --- a/glutils_funcs.cpp +++ b/glutils_funcs.cpp @@ -24,7 +24,7 @@ License. See the file "COPYING" for the exact licensing terms. #ifdef HAVE_OPENGL -namespace KWinInternal +namespace KWin { // Function pointers diff --git a/glutils_funcs.h b/glutils_funcs.h index 7f884f41e0..016e73d4d8 100644 --- a/glutils_funcs.h +++ b/glutils_funcs.h @@ -13,7 +13,7 @@ License. See the file "COPYING" for the exact licensing terms. #ifdef HAVE_OPENGL -namespace KWinInternal +namespace KWin { void glxResolveFunctions(); diff --git a/group.cpp b/group.cpp index abf2d1aee9..0a4f9322e7 100644 --- a/group.cpp +++ b/group.cpp @@ -33,7 +33,7 @@ License. See the file "COPYING" for the exact licensing terms. or I'll get it backwards in half of the cases again. */ -namespace KWinInternal +namespace KWin { //******************************************** diff --git a/group.h b/group.h index 21ebb8d17e..725280ed2d 100644 --- a/group.h +++ b/group.h @@ -16,7 +16,7 @@ License. See the file "COPYING" for the exact licensing terms. #include #include -namespace KWinInternal +namespace KWin { class Client; @@ -41,8 +41,6 @@ class Group bool groupEvent( XEvent* e ); void updateUserTime( Time time = CurrentTime ); Time userTime() const; - void ref(); - void deref(); private: void getIcons(); void startupIdChanged(); @@ -52,7 +50,6 @@ class Group Workspace* _workspace; NETWinInfo* leader_info; Time user_time; - int refcount; }; inline Window Group::leader() const diff --git a/kcmkwin/kwinrules/detectwidget.cpp b/kcmkwin/kwinrules/detectwidget.cpp index c815b4433f..eafa8582b0 100644 --- a/kcmkwin/kwinrules/detectwidget.cpp +++ b/kcmkwin/kwinrules/detectwidget.cpp @@ -37,7 +37,7 @@ #include #include -namespace KWinInternal +namespace KWin { DetectWidget::DetectWidget( QWidget* parent, const char* name ) diff --git a/kcmkwin/kwinrules/detectwidget.h b/kcmkwin/kwinrules/detectwidget.h index 21eaf6c025..ab25833073 100644 --- a/kcmkwin/kwinrules/detectwidget.h +++ b/kcmkwin/kwinrules/detectwidget.h @@ -30,7 +30,7 @@ #include #include -namespace KWinInternal +namespace KWin { class DetectWidget diff --git a/kcmkwin/kwinrules/detectwidgetbase.ui b/kcmkwin/kwinrules/detectwidgetbase.ui index 8c83b3a848..d40ed18b8f 100644 --- a/kcmkwin/kwinrules/detectwidgetbase.ui +++ b/kcmkwin/kwinrules/detectwidgetbase.ui @@ -1,232 +1,218 @@ - - - - - KWinInternal::DetectWidgetBase - - - - 0 - 0 - 523 - 325 - + +KWin::DetectWidgetBase + + + DetectWidgetBase - - - 0 - - - - - - 20 - 40 - - - - Expanding - - - Qt::Vertical - - - - - - - Extra role: - - - false - - - - - - - Class: - - - false - - - - - - - Role: - - - false - - - - - - - - - - false - - - - - - - Title: - - - false - - - - - - - - - - false - - - - - - - - - - false - - - - - - - - - - false - - - - - - - - - - false - - - - - - - Type: - - - false - - - - - - - - - - false - - - - - - - Machine: - - - false - - - - - - - QFrame::HLine - - - QFrame::Sunken - - - - - - - Information About Selected Window - - - false - - - - - - - - - - - 0 + + + 0 + 0 + 523 + 325 + + + + + unnamed + + + 0 + + + + spacer1 + + + Qt::Vertical + + + Expanding + + + + 20 + 40 + + + + + + textLabel11 + + + Extra role: - - - - Use window &class (whole application) - - - true - - - For selecting all windows belonging to a specific application, selecting only window class should usually work. - - - - - - - Use window class and window &role (specific window) - - - For selecting a specific window in an application, both window class and window role should be selected. Window class will determine the application, and window role the specific window in the application; many applications do not provide useful window roles though. - - - - - - - Use &whole window class (specific window) - - - With some (non-KDE) applications whole window class can be sufficient for selecting a specific window in an application, as they set whole window class to contain both application and window role. - - - - - - - Match also window &title - - - - - - - - - - qPixmapFromMimeSource - + + + textLabel1 + + + Class: + + + + + textLabel3 + + + Role: + + + + + type_label + + + + + + + + textLabel8 + + + Title: + + + + + class_label + + + + + + + + role_label + + + + + + + + title_label + + + + + + + + machine_label + + + + + + + + textLabel4 + + + Type: + + + + + extrarole_label + + + + + + + + textLabel13 + + + Machine: + + + + + line1 + + + HLine + + + Sunken + + + Qt::Horizontal + + + + + textLabel9 + + + Information About Selected Window + + + + + buttonGroup1 + + + + + + + unnamed + + + + use_class + + + Use window &class (whole application) + + + true + + + For selecting all windows belonging to a specific application, selecting only window class should usually work. + + + + + use_role + + + Use window class and window &role (specific window) + + + For selecting a specific window in an application, both window class and window role should be selected. Window class will determine the application, and window role the specific window in the application; many applications do not provide useful window roles though. + + + + + use_whole_class + + + Use &whole window class (specific window) + + + With some (non-KDE) applications whole window class can be sufficient for selecting a specific window in an application, as they set whole window class to contain both application and window role. + + + + + match_title + + + Match also window &title + + + + + + + + + diff --git a/kcmkwin/kwinrules/kcm.cpp b/kcmkwin/kwinrules/kcm.cpp index be95670c31..c516413a54 100644 --- a/kcmkwin/kwinrules/kcm.cpp +++ b/kcmkwin/kwinrules/kcm.cpp @@ -30,10 +30,10 @@ #include "ruleslist.h" -typedef KGenericFactory KCMRulesFactory; +typedef KGenericFactory KCMRulesFactory; K_EXPORT_COMPONENT_FACTORY(kwinrules, KCMRulesFactory("kcmkwinrules")) -namespace KWinInternal +namespace KWin { KCMRules::KCMRules( QWidget *parent, const QStringList & ) diff --git a/kcmkwin/kwinrules/kcm.h b/kcmkwin/kwinrules/kcm.h index 3bdbf873f7..b8bf1ed92f 100644 --- a/kcmkwin/kwinrules/kcm.h +++ b/kcmkwin/kwinrules/kcm.h @@ -27,7 +27,7 @@ class KConfig; class KAboutData; class QStringList; -namespace KWinInternal +namespace KWin { class KCMRulesList; diff --git a/kcmkwin/kwinrules/main.cpp b/kcmkwin/kwinrules/main.cpp index 6f6e31a89f..510a9a5fd7 100644 --- a/kcmkwin/kwinrules/main.cpp +++ b/kcmkwin/kwinrules/main.cpp @@ -30,7 +30,7 @@ #include "../../rules.h" #include -namespace KWinInternal +namespace KWin { static void loadRules( QList< Rules* >& rules ) @@ -289,5 +289,5 @@ KDE_EXPORT int kdemain( int argc, char* argv[] ) KCmdLineArgs::usage( i18n( "This helper utility is not supposed to be called directly." )); return 1; } - return KWinInternal::edit( id, whole_app ); + return KWin::edit( id, whole_app ); } diff --git a/kcmkwin/kwinrules/ruleslist.cpp b/kcmkwin/kwinrules/ruleslist.cpp index 795ec4bdc9..b3aa5c79c2 100644 --- a/kcmkwin/kwinrules/ruleslist.cpp +++ b/kcmkwin/kwinrules/ruleslist.cpp @@ -25,7 +25,7 @@ #include "ruleswidget.h" -namespace KWinInternal +namespace KWin { KCMRulesList::KCMRulesList( QWidget* parent, const char* name ) diff --git a/kcmkwin/kwinrules/ruleslist.h b/kcmkwin/kwinrules/ruleslist.h index 0a0d961b9a..b5a8595647 100644 --- a/kcmkwin/kwinrules/ruleslist.h +++ b/kcmkwin/kwinrules/ruleslist.h @@ -20,32 +20,23 @@ #ifndef __RULESLIST_H__ #define __RULESLIST_H__ -#include "ui_ruleslistbase.h" +#include "ruleslistbase.h" #include "../../rules.h" -class QListWidgetItem; +class Q3ListBoxItem; -namespace KWinInternal +namespace KWin { -class KCMRulesListBase : public QWidget, public Ui::KCMRulesListBase -{ -public: - KCMRulesListBase( QWidget *parent ) : QWidget( parent ) { - setupUi( this ); - } -}; - - class KCMRulesList : public KCMRulesListBase { Q_OBJECT public: - KCMRulesList( QWidget* parent = NULL ); + KCMRulesList( QWidget* parent = NULL, const char* name = NULL ); virtual ~KCMRulesList(); void load(); void save(); @@ -58,7 +49,7 @@ class KCMRulesList void deleteClicked(); void moveupClicked(); void movedownClicked(); - void activeChanged( QListWidgetItem* ); + void activeChanged( Q3ListBoxItem* ); private: QVector< Rules* > rules; }; diff --git a/kcmkwin/kwinrules/ruleslistbase.ui b/kcmkwin/kwinrules/ruleslistbase.ui index 6bedc59dd5..1df3eef173 100644 --- a/kcmkwin/kwinrules/ruleslistbase.ui +++ b/kcmkwin/kwinrules/ruleslistbase.ui @@ -1,5 +1,5 @@ -KWinInternal::KCMRulesListBase +KWin::KCMRulesListBase KCMRulesListBase diff --git a/kcmkwin/kwinrules/ruleswidget.cpp b/kcmkwin/kwinrules/ruleswidget.cpp index 63b0214281..a2f8892772 100644 --- a/kcmkwin/kwinrules/ruleswidget.cpp +++ b/kcmkwin/kwinrules/ruleswidget.cpp @@ -37,7 +37,7 @@ #include "detectwidget.h" -namespace KWinInternal +namespace KWin { #define SETUP( var, type ) \ diff --git a/kcmkwin/kwinrules/ruleswidget.h b/kcmkwin/kwinrules/ruleswidget.h index 2b5ea86b14..1deac81815 100644 --- a/kcmkwin/kwinrules/ruleswidget.h +++ b/kcmkwin/kwinrules/ruleswidget.h @@ -27,7 +27,7 @@ #include "ruleswidgetbase.h" #include "editshortcutbase.h" -namespace KWinInternal +namespace KWin { class Rules; diff --git a/kcmkwin/kwinrules/ruleswidgetbase.ui b/kcmkwin/kwinrules/ruleswidgetbase.ui index 327e0abaee..97b6084754 100644 --- a/kcmkwin/kwinrules/ruleswidgetbase.ui +++ b/kcmkwin/kwinrules/ruleswidgetbase.ui @@ -1,5 +1,5 @@ -KWinInternal::RulesWidgetBase +KWin::RulesWidgetBase RulesWidgetBase @@ -329,7 +329,7 @@ types - + Normal Window @@ -384,7 +384,7 @@ types - MultiSelection + Multi @@ -2541,9 +2541,4 @@ - - kpushbutton.h - kcombobox.h - krestrictedline.h - diff --git a/killwindow.cpp b/killwindow.cpp index ff1f215020..262b3b75eb 100644 --- a/killwindow.cpp +++ b/killwindow.cpp @@ -20,7 +20,7 @@ License. See the file "COPYING" for the exact licensing terms. #include #include -namespace KWinInternal +namespace KWin { KillWindow::KillWindow( Workspace* ws ) @@ -76,7 +76,7 @@ void KillWindow::start() mx /= 10; my /= 10; } - QCursor::setPos(QCursor::pos()+QPoint(mx, my)); + QCursor::setPos(cursorPos()+QPoint(mx, my)); } if (ev.type == ButtonRelease) @@ -87,8 +87,7 @@ void KillWindow::start() escape_pressed = true; break; } - if( ev.xbutton.button == Button1 || ev.xbutton.button == Button2 ) - workspace->killWindowId(ev.xbutton.subwindow); + workspace->killWindowId(ev.xbutton.subwindow); } continue; } diff --git a/killwindow.h b/killwindow.h index 3d94c72918..4819c27dc8 100644 --- a/killwindow.h +++ b/killwindow.h @@ -14,7 +14,7 @@ License. See the file "COPYING" for the exact licensing terms. #include "workspace.h" -namespace KWinInternal +namespace KWin { class KillWindow diff --git a/layers.cpp b/layers.cpp index 7d134971da..8ac7c24796 100644 --- a/layers.cpp +++ b/layers.cpp @@ -74,7 +74,7 @@ License. See the file "COPYING" for the exact licensing terms. #include "rules.h" #include -namespace KWinInternal +namespace KWin { //******************************* diff --git a/main.cpp b/main.cpp index cabab757da..23174a8d7c 100644 --- a/main.cpp +++ b/main.cpp @@ -14,7 +14,6 @@ License. See the file "COPYING" for the exact licensing terms. #include "main.h" -#include #include #include #include @@ -26,11 +25,13 @@ License. See the file "COPYING" for the exact licensing terms. #include #include #include +#include #include "atoms.h" #include "options.h" #include "sm.h" #include "utils.h" +#include "effects.h" #define INT8 _X11INT8 #define INT32 _X11INT32 @@ -38,7 +39,7 @@ License. See the file "COPYING" for the exact licensing terms. #undef INT8 #undef INT32 -namespace KWinInternal +namespace KWin { Options* options; @@ -120,6 +121,8 @@ Application::Application( ) options = new Options; atoms = new Atoms; + initting = false; // TODO + // create workspace. (void) new Workspace( isSessionRestored() ); @@ -127,13 +130,15 @@ Application::Application( ) initting = false; // startup done, we are up and running now. + QDBusInterface ksplash( "org.kde.ksplash", "/ksplash", "org.kde.KSplash" ); + ksplash.call( "upAndRunning", QString( "wm started" )); XEvent e; e.xclient.type = ClientMessage; e.xclient.message_type = XInternAtom( display(), "_KDE_SPLASH_PROGRESS", False ); e.xclient.display = display(); e.xclient.window = rootWindow(); e.xclient.format = 8; - strcpy( e.xclient.data.b, "wm" ); + strcpy( e.xclient.data.b, "wm started" ); XSendEvent( display(), rootWindow(), False, SubstructureNotifyMask, &e ); } @@ -143,6 +148,8 @@ Application::~Application() if( owner.ownerWindow() != None ) // if there was no --replace (no new WM) XSetInputFocus( display(), PointerRoot, RevertToPointerRoot, xTime() ); delete options; + delete effects; + delete atoms; } void Application::lostSelection() @@ -209,7 +216,7 @@ KDE_EXPORT int kdemain( int argc, char * argv[] ) } int number_of_screens = ScreenCount( dpy ); - KWinInternal::screen_number = DefaultScreen( dpy ); + KWin::screen_number = DefaultScreen( dpy ); int pos; // temporarily needed to reconstruct DISPLAY var if multi-head QByteArray display_name = XDisplayString( dpy ); XCloseDisplay( dpy ); @@ -225,9 +232,9 @@ KDE_EXPORT int kdemain( int argc, char * argv[] ) { // if execution doesn't pass by here, then kwin // acts exactly as previously - if ( i != KWinInternal::screen_number && fork() == 0 ) + if ( i != KWin::screen_number && fork() == 0 ) { - KWinInternal::screen_number = i; + KWin::screen_number = i; // break here because we are the child process, we don't // want to fork() anymore break; @@ -235,7 +242,7 @@ KDE_EXPORT int kdemain( int argc, char * argv[] ) } // in the next statement, display_name shouldn't contain a screen // number. If it had it, it was removed at the "pos" check - envir.sprintf("DISPLAY=%s.%d", display_name.data(), KWinInternal::screen_number); + envir.sprintf("DISPLAY=%s.%d", display_name.data(), KWin::screen_number); if (putenv( strdup(envir.toAscii())) ) { @@ -259,27 +266,27 @@ KDE_EXPORT int kdemain( int argc, char * argv[] ) KCmdLineArgs::init(argc, argv, &aboutData); KCmdLineArgs::addCmdLineOptions( args ); - if (signal(SIGTERM, KWinInternal::sighandler) == SIG_IGN) + if (signal(SIGTERM, KWin::sighandler) == SIG_IGN) signal(SIGTERM, SIG_IGN); - if (signal(SIGINT, KWinInternal::sighandler) == SIG_IGN) + if (signal(SIGINT, KWin::sighandler) == SIG_IGN) signal(SIGINT, SIG_IGN); - if (signal(SIGHUP, KWinInternal::sighandler) == SIG_IGN) + if (signal(SIGHUP, KWin::sighandler) == SIG_IGN) signal(SIGHUP, SIG_IGN); #ifdef __GNUC__ #warning D-BUS TODO // KApplication::disableAutoDcopRegistration(); #endif - KWinInternal::Application a; - KWinInternal::SessionManager weAreIndeed; - KWinInternal::SessionSaveDoneHelper helper; + KWin::Application a; + KWin::SessionManager weAreIndeed; + KWin::SessionSaveDoneHelper helper; - fcntl(XConnectionNumber(KWinInternal::display()), F_SETFD, 1); + fcntl(XConnectionNumber(KWin::display()), F_SETFD, 1); QString appname; - if (KWinInternal::screen_number == 0) - appname = "org.kde.kwin"; + if (KWin::screen_number == 0) + appname = "kwin"; else - appname.sprintf("org.kde.kwin-screen-%d", KWinInternal::screen_number); + appname.sprintf("kwin-screen-%d", KWin::screen_number); QDBusConnection::sessionBus().interface()->registerService( appname, QDBusConnectionInterface::DontQueueService ); diff --git a/main.h b/main.h index 5ac38a61a0..551fa19616 100644 --- a/main.h +++ b/main.h @@ -16,7 +16,7 @@ License. See the file "COPYING" for the exact licensing terms. #include "workspace.h" #include "utils.h" -namespace KWinInternal +namespace KWin { class Application : public KApplication diff --git a/manage.cpp b/manage.cpp index f2b552c1a7..33e3678aeb 100644 --- a/manage.cpp +++ b/manage.cpp @@ -26,7 +26,7 @@ License. See the file "COPYING" for the exact licensing terms. #include "rules.h" #include "group.h" -namespace KWinInternal +namespace KWin { /*! diff --git a/notifications.cpp b/notifications.cpp index beff013f38..106a6ec693 100644 --- a/notifications.cpp +++ b/notifications.cpp @@ -14,7 +14,7 @@ License. See the file "COPYING" for the exact licensing terms. #include "client.h" -namespace KWinInternal +namespace KWin { QString Notify::eventToName( Event e ) diff --git a/notifications.h b/notifications.h index eb01d89492..1aa5fea43c 100644 --- a/notifications.h +++ b/notifications.h @@ -16,7 +16,7 @@ License. See the file "COPYING" for the exact licensing terms. #include #include -namespace KWinInternal +namespace KWin { class Client; diff --git a/options.cpp b/options.cpp index 1e98766f56..887ad751d6 100644 --- a/options.cpp +++ b/options.cpp @@ -26,7 +26,7 @@ License. See the file "COPYING" for the exact licensing terms. #endif -namespace KWinInternal +namespace KWin { #ifndef KCMRULES diff --git a/options.h b/options.h index 6bd0b68626..17cd0d6dff 100644 --- a/options.h +++ b/options.h @@ -20,7 +20,7 @@ License. See the file "COPYING" for the exact licensing terms. #include "placement.h" -namespace KWinInternal +namespace KWin { class Client; diff --git a/placement.cpp b/placement.cpp index b9d141de4f..c10475f96c 100644 --- a/placement.cpp +++ b/placement.cpp @@ -22,7 +22,7 @@ License. See the file "COPYING" for the exact licensing terms. #include "rules.h" #endif -namespace KWinInternal +namespace KWin { #ifndef KCMRULES diff --git a/placement.h b/placement.h index c75b6e2b2a..e6c7b685ff 100644 --- a/placement.h +++ b/placement.h @@ -17,7 +17,7 @@ License. See the file "COPYING" for the exact licensing terms. #include #include -namespace KWinInternal +namespace KWin { class Workspace; diff --git a/plugins.cpp b/plugins.cpp index 6c6c772cab..c98e88acfe 100644 --- a/plugins.cpp +++ b/plugins.cpp @@ -16,7 +16,7 @@ License. See the file "COPYING" for the exact licensing terms. #include #include -namespace KWinInternal +namespace KWin { PluginMgr::PluginMgr() diff --git a/plugins.h b/plugins.h index 7e779098c6..781589dcfe 100644 --- a/plugins.h +++ b/plugins.h @@ -14,7 +14,7 @@ License. See the file "COPYING" for the exact licensing terms. #include -namespace KWinInternal +namespace KWin { class PluginMgr diff --git a/popupinfo.cpp b/popupinfo.cpp index c7594efe4b..b6b8195278 100644 --- a/popupinfo.cpp +++ b/popupinfo.cpp @@ -33,7 +33,7 @@ License. See the file "COPYING" for the exact licensing terms. // specify externals before namespace -namespace KWinInternal +namespace KWin { PopupInfo::PopupInfo( const char *name ) diff --git a/popupinfo.h b/popupinfo.h index d053866766..2180950472 100644 --- a/popupinfo.h +++ b/popupinfo.h @@ -14,7 +14,7 @@ License. See the file "COPYING" for the exact licensing terms. #include #include -namespace KWinInternal +namespace KWin { class Workspace; diff --git a/rules.cpp b/rules.cpp index 39cd054603..e3bd1fc1b9 100644 --- a/rules.cpp +++ b/rules.cpp @@ -22,7 +22,7 @@ License. See the file "COPYING" for the exact licensing terms. #include "workspace.h" #endif -namespace KWinInternal +namespace KWin { Rules::Rules() @@ -850,8 +850,6 @@ void Client::updateWindowRules() { if( !isManaged()) // not fully setup yet return; - if( workspace()->rulesUpdatesDisabled()) - return; client_rules.update( this ); } @@ -1009,14 +1007,6 @@ void Workspace::rulesUpdated() rulesUpdatedTimer.start( 1000 ); } -void Workspace::disableRulesUpdates( bool disable ) - { - rules_updates_disabled = disable; - if( !disable ) - foreach( Client* c, clients ) - c->updateWindowRules(); - } - #endif } // namespace diff --git a/rules.h b/rules.h index f2f3e9149b..fdf71ba7b8 100644 --- a/rules.h +++ b/rules.h @@ -24,7 +24,7 @@ License. See the file "COPYING" for the exact licensing terms. class KConfig; -namespace KWinInternal +namespace KWin { class Client; diff --git a/scene.cpp b/scene.cpp index e53405d214..4a1721c214 100644 --- a/scene.cpp +++ b/scene.cpp @@ -67,7 +67,7 @@ License. See the file "COPYING" for the exact licensing terms. #include "deleted.h" #include "effects.h" -namespace KWinInternal +namespace KWin { //**************************************** diff --git a/scene.h b/scene.h index 806916659e..be5f5dd78b 100644 --- a/scene.h +++ b/scene.h @@ -16,7 +16,7 @@ License. See the file "COPYING" for the exact licensing terms. #include "toplevel.h" #include "utils.h" -namespace KWinInternal +namespace KWin { class Workspace; diff --git a/scene_basic.cpp b/scene_basic.cpp index 7a2726204d..f67cab5e7e 100644 --- a/scene_basic.cpp +++ b/scene_basic.cpp @@ -20,7 +20,7 @@ License. See the file "COPYING" for the exact licensing terms. #include "utils.h" #include "client.h" -namespace KWinInternal +namespace KWin { SceneBasic::SceneBasic( Workspace* ws ) diff --git a/scene_basic.h b/scene_basic.h index 181fc00376..87e95ceb29 100644 --- a/scene_basic.h +++ b/scene_basic.h @@ -13,7 +13,7 @@ License. See the file "COPYING" for the exact licensing terms. #include "scene.h" -namespace KWinInternal +namespace KWin { class SceneBasic diff --git a/scene_opengl.cpp b/scene_opengl.cpp index 5a74c37bd6..807bc9e411 100644 --- a/scene_opengl.cpp +++ b/scene_opengl.cpp @@ -70,7 +70,7 @@ Sources and other compositing managers: #ifdef HAVE_OPENGL -namespace KWinInternal +namespace KWin { //**************************************** diff --git a/scene_opengl.h b/scene_opengl.h index 879f24e4d1..8adc784582 100644 --- a/scene_opengl.h +++ b/scene_opengl.h @@ -21,7 +21,7 @@ License. See the file "COPYING" for the exact licensing terms. #include #endif -namespace KWinInternal +namespace KWin { class SceneOpenGL diff --git a/scene_xrender.cpp b/scene_xrender.cpp index 6a6a1a8562..abaae3b4fd 100644 --- a/scene_xrender.cpp +++ b/scene_xrender.cpp @@ -36,7 +36,7 @@ License. See the file "COPYING" for the exact licensing terms. #include "deleted.h" #include "effects.h" -namespace KWinInternal +namespace KWin { //**************************************** diff --git a/scene_xrender.h b/scene_xrender.h index 677dcedc6b..4fa919ab5b 100644 --- a/scene_xrender.h +++ b/scene_xrender.h @@ -18,7 +18,7 @@ License. See the file "COPYING" for the exact licensing terms. #ifdef HAVE_XRENDER #include -namespace KWinInternal +namespace KWin { class Matrix; diff --git a/sm.cpp b/sm.cpp index 649465f70d..ac2a978742 100644 --- a/sm.cpp +++ b/sm.cpp @@ -11,7 +11,6 @@ License. See the file "COPYING" for the exact licensing terms. #include "sm.h" -//#include #include #include #include @@ -23,8 +22,9 @@ License. See the file "COPYING" for the exact licensing terms. #include "client.h" #include #include +#include -namespace KWinInternal +namespace KWin { bool SessionManager::saveState( QSessionManager& sm ) @@ -256,6 +256,28 @@ bool Workspace::sessionInfoWindowTypeMatch( Client* c, SessionInfo* info ) return info->windowType == c->windowType(); } +// maybe needed later +#if 0 +// KMainWindow's without name() given have WM_WINDOW_ROLE in the form +// of -mainwindow# +// when comparing them for fake session info, it's probably better to check +// them without the trailing number +bool Workspace::windowRoleMatch( const QByteArray& role1, const QByteArray& role2 ) + { + if( role1.isEmpty() && role2.isEmpty()) + return true; + int pos1 = role1.find( '#' ); + int pos2 = role2.find( '#' ); + bool ret; + if( pos1 < 0 || pos2 < 0 || pos1 != pos2 ) + ret = role1 == role2; + else + ret = qstrncmp( role1, role2, pos1 ) == 0; + kDebug() << "WR:" << role1 << ":" << pos1 << ":" << role2 << ":" << pos2 << ":::" << ret << endl; + return ret; + } +#endif + static const char* const window_type_names[] = { "Unknown", "Normal" , "Desktop", "Dock", "Toolbar", "Menu", "Dialog", @@ -293,21 +315,11 @@ NET::WindowType Workspace::txtToWindowType( const char* txt ) // but Qt doesn't have API for saying when session saved finished (either // successfully, or was canceled). Therefore, create another connection // to session manager, that will provide this information. -// Similarly the remember feature of window-specific settings should be disabled -// during KDE shutdown when windows may move e.g. because of Kicker going away -// (struts changing). When session saving starts, it can be cancelled, in which -// case the shutdown_cancelled callback is invoked, or it's a checkpoint that -// is immediatelly followed by save_complete, or finally it's a shutdown that -// is immediatelly followed by die callback. So getting save_yourself with shutdown -// set disables window-specific settings remembering, getting shutdown_cancelled -// re-enables, otherwise KWin will go away after die. -static void save_yourself( SmcConn conn_P, SmPointer ptr, int, Bool shutdown, int, Bool ) +static void save_yourself( SmcConn conn_P, SmPointer ptr, int, Bool, int, Bool ) { SessionSaveDoneHelper* session = reinterpret_cast< SessionSaveDoneHelper* >( ptr ); if( conn_P != session->connection()) return; - if( shutdown ) - Workspace::self()->disableRulesUpdates( true ); SmcSaveYourselfDone( conn_P, True ); } @@ -333,7 +345,6 @@ static void shutdown_cancelled( SmcConn conn_P, SmPointer ptr ) SessionSaveDoneHelper* session = reinterpret_cast< SessionSaveDoneHelper* >( ptr ); if( conn_P != session->connection()) return; - Workspace::self()->disableRulesUpdates( false ); // re-enable // no need to differentiate between successful finish and cancel session->saveDone(); } diff --git a/sm.h b/sm.h index de25ab3fd2..f3d643bfe1 100644 --- a/sm.h +++ b/sm.h @@ -20,7 +20,7 @@ License. See the file "COPYING" for the exact licensing terms. class QSocketNotifier; -namespace KWinInternal +namespace KWin { struct SessionInfo diff --git a/tabbox.cpp b/tabbox.cpp index c468f49b52..d1ac8b2fd3 100644 --- a/tabbox.cpp +++ b/tabbox.cpp @@ -38,7 +38,7 @@ License. See the file "COPYING" for the exact licensing terms. // specify externals before namespace -namespace KWinInternal +namespace KWin { extern QPixmap* kwin_get_menu_pix_hack(); diff --git a/tabbox.h b/tabbox.h index 919a7b0fce..b3089c98d9 100644 --- a/tabbox.h +++ b/tabbox.h @@ -18,7 +18,7 @@ License. See the file "COPYING" for the exact licensing terms. class QLabel; -namespace KWinInternal +namespace KWin { class Workspace; diff --git a/toplevel.cpp b/toplevel.cpp index 0ef11d8f2e..d88e3d78b5 100644 --- a/toplevel.cpp +++ b/toplevel.cpp @@ -16,7 +16,7 @@ License. See the file "COPYING" for the exact licensing terms. #include "client.h" #include "effects.h" -namespace KWinInternal +namespace KWin { Toplevel::Toplevel( Workspace* ws ) diff --git a/toplevel.h b/toplevel.h index bb56a43fec..b3c3540bbd 100644 --- a/toplevel.h +++ b/toplevel.h @@ -20,7 +20,7 @@ License. See the file "COPYING" for the exact licensing terms. class NETWinInfo; -namespace KWinInternal +namespace KWin { class Workspace; diff --git a/unmanaged.cpp b/unmanaged.cpp index 8f8e7244ee..8771bb5e80 100644 --- a/unmanaged.cpp +++ b/unmanaged.cpp @@ -16,7 +16,7 @@ License. See the file "COPYING" for the exact licensing terms. #include -namespace KWinInternal +namespace KWin { Unmanaged::Unmanaged( Workspace* ws ) diff --git a/unmanaged.h b/unmanaged.h index 075bc26ff7..938de0c3cf 100644 --- a/unmanaged.h +++ b/unmanaged.h @@ -15,7 +15,7 @@ License. See the file "COPYING" for the exact licensing terms. #include "toplevel.h" -namespace KWinInternal +namespace KWin { class Unmanaged diff --git a/useractions.cpp b/useractions.cpp index 87e30da55d..f19a466b62 100644 --- a/useractions.cpp +++ b/useractions.cpp @@ -41,7 +41,7 @@ License. See the file "COPYING" for the exact licensing terms. #include "killwindow.h" #include "tabbox.h" -namespace KWinInternal +namespace KWin { //**************************************** diff --git a/utils.cpp b/utils.cpp index 34630230d7..411681db26 100644 --- a/utils.cpp +++ b/utils.cpp @@ -39,7 +39,7 @@ License. See the file "COPYING" for the exact licensing terms. #endif -namespace KWinInternal +namespace KWin { #ifndef KCMRULES diff --git a/utils.h b/utils.h index b1645c9017..164bfaa283 100644 --- a/utils.h +++ b/utils.h @@ -46,7 +46,7 @@ License. See the file "COPYING" for the exact licensing terms. #include #include -namespace KWinInternal +namespace KWin { #ifndef HAVE_XDAMAGE diff --git a/workspace.cpp b/workspace.cpp index c837f650d5..f76d0efa3e 100644 --- a/workspace.cpp +++ b/workspace.cpp @@ -58,7 +58,7 @@ License. See the file "COPYING" for the exact licensing terms. #include #include -namespace KWinInternal +namespace KWin { extern int screen_number; diff --git a/workspace.h b/workspace.h index dcfe4e7d3b..588bbbdba5 100644 --- a/workspace.h +++ b/workspace.h @@ -37,7 +37,7 @@ class KStartupInfoData; class QSlider; class QPushButton; -namespace KWinInternal +namespace KWin { class Client; @@ -721,7 +721,7 @@ class StackingUpdatesBlocker class RootInfo : public NETRootInfo { private: - typedef KWinInternal::Client Client; // because of NET::Client + typedef KWin::Client Client; // because of NET::Client public: RootInfo( Workspace* ws, Display *dpy, Window w, const char *name, unsigned long pr[], int pr_num, int scr= -1); protected: