From cb5978260f524433e0dee3d7c06b63e921690e59 Mon Sep 17 00:00:00 2001 From: Matthias Ettrich Date: Sat, 13 Nov 1999 03:44:09 +0000 Subject: [PATCH] fake being kwm (helps some docking apps out there) svn path=/trunk/kdebase/kwin/; revision=33646 --- atoms.cpp | 1 + atoms.h | 4 +++- client.cpp | 2 ++ workspace.cpp | 7 +++++++ 4 files changed, 13 insertions(+), 1 deletion(-) diff --git a/atoms.cpp b/atoms.cpp index d04cbd3d61..db931d8d3c 100644 --- a/atoms.cpp +++ b/atoms.cpp @@ -11,6 +11,7 @@ Atoms::Atoms() // compatibility kwm_win_icon = XInternAtom(qt_xdisplay(), "KWM_WIN_ICON", FALSE); + kwm_running = XInternAtom(qt_xdisplay(), "KWM_RUNNING", FALSE); net_number_of_desktops = XInternAtom(qt_xdisplay(), "_NET_NUMBER_OF_DESKTOPS", False); diff --git a/atoms.h b/atoms.h index 05ee016f7b..46ea04a200 100644 --- a/atoms.h +++ b/atoms.h @@ -10,13 +10,15 @@ public: Atom wm_delete_window; Atom wm_take_focus; Atom kwm_win_icon; // compatibility + Atom kwm_running; Atom net_number_of_desktops; Atom net_current_desktop; Atom net_active_window; Atom net_client_list; Atom net_client_list_stacking; - + + Atom net_kde_docking_windows; }; diff --git a/client.cpp b/client.cpp index 57a587e785..9902c47f56 100644 --- a/client.cpp +++ b/client.cpp @@ -307,6 +307,7 @@ void Client::manage( bool isMapped ) QRect geom( original_geometry ); bool placementDone = FALSE; + qDebug("geom: width=%d", geom.width() ); if ( isMapped ) placementDone = TRUE; else { @@ -326,6 +327,7 @@ void Client::manage( bool isMapped ) } } + qDebug("geom after: width=%d", geom.width() ); // the clever activate() trick is necessary layout()->activate(); resize ( sizeForWindowSize( geom.size() ) ); diff --git a/workspace.cpp b/workspace.cpp index 3daeef250b..9576bcb7e5 100644 --- a/workspace.cpp +++ b/workspace.cpp @@ -100,6 +100,11 @@ Workspace::Workspace() int dummy; kwin_has_shape = XShapeQueryExtension(qt_xdisplay(), &kwin_shape_event, &dummy); + // compatibility + long data = 1; + XChangeProperty(qt_xdisplay(), qt_xrootwin(), atoms->kwm_running, atoms->kwm_running, 32, + PropModeAppend, (unsigned char*) &data, 1); + init(); control_grab = FALSE; tab_grab = FALSE; @@ -197,6 +202,8 @@ Workspace::~Workspace() delete tab_box; delete popup; delete keys; + if ( root == qt_xrootwin() ) + XDeleteProperty(qt_xdisplay(), qt_xrootwin(), atoms->kwm_running); } /*!