summaryrefslogtreecommitdiffstats
path: root/kwin/client.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-09-09 02:03:42 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-09-09 02:03:42 +0000
commitf5f0024b74d1bb0eb94937f3dc175d2b682617c2 (patch)
tree3a0ae78b135c013360df101cf7fd8a3374d0e43a /kwin/client.cpp
parent5a63d5945b2f886322c3ed6f5561822bcb1ed6fa (diff)
downloadtdebase-f5f0024b74d1bb0eb94937f3dc175d2b682617c2.tar.gz
tdebase-f5f0024b74d1bb0eb94937f3dc175d2b682617c2.zip
Add new _KDE_WM_MODAL_SYS_NOTIFICATION atom to disable menu/close/on-all-desktops buttons
Improve the appearance of the TDE logout sequence using the new atom git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1252231 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kwin/client.cpp')
-rw-r--r--kwin/client.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/kwin/client.cpp b/kwin/client.cpp
index 3205b9ec7..114300821 100644
--- a/kwin/client.cpp
+++ b/kwin/client.cpp
@@ -499,6 +499,20 @@ void Client::setUserNoBorder( bool set )
updateWindowRules();
}
+bool Client::isModalSystemNotification() const
+ {
+ unsigned char *data = 0;
+ Atom actual;
+ int format, result;
+ unsigned long n, left;
+ result = XGetWindowProperty(qt_xdisplay(), window(), atoms->net_wm_system_modal_notification, 0L, 1L, False, XA_CARDINAL, &actual, &format, &n, &left, /*(unsigned char **)*/ &data);
+ if (result == Success && data != None && format == 32 )
+ {
+ return TRUE;
+ }
+ return FALSE;
+ }
+
void Client::updateShape()
{
// workaround for #19644 - tqshaped windows shouldn't have decoration
@@ -603,6 +617,8 @@ bool Client::isMinimizable() const
{
if( isSpecialWindow())
return false;
+ if( isModalSystemNotification())
+ return false;
if( isTransient())
{ // #66868 - let other xmms windows be minimized when the mainwindow is minimized
bool shown_mainwindow = false;
@@ -799,6 +815,8 @@ void Client::setShade( ShadeMode mode )
{
if( !isShadeable())
return;
+ if( isModalSystemNotification())
+ return;
mode = rules()->checkShade( mode );
if( shade_mode == mode )
return;
@@ -1674,6 +1692,8 @@ void Client::sendClientMessage(Window w, Atom a, Atom protocol, long data1, long
*/
bool Client::isCloseable() const
{
+ if( isModalSystemNotification())
+ return false;
return rules()->checkCloseable( motif_may_close && !isSpecialWindow());
}