[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    kdebase/kwin
From:       Luboš Luňák <l.lunak () kde ! org>
Date:       2003-01-10 12:39:27
[Download RAW message or body]

CVS commit by lunakl: 

Only one place where WM_TRANSIENT_FOR is read + fix a bug in mainClient().


  M +16 -19    client.cpp   1.344
  M +1 -0      client.h   1.91


--- kdebase/kwin/client.cpp  #1.343:1.344
@@ -608,13 +608,4 @@ Client::Client( Workspace *ws, WId w, QW
     }
 
-    Window ww;
-    if ( !XGetTransientForHint( qt_xdisplay(), (Window) win, &ww ) )
-        transient_for = None;
-    else {
-        transient_for = (WId) ww;
-        transient_for_defined = TRUE;
-        verifyTransientFor();
-    }
-
     XClassHint classHint;
     if ( XGetClassHint( qt_xdisplay(), win, &classHint ) ) {
@@ -693,4 +684,6 @@ bool Client::manage( bool isMapped, bool
     }
 
+    getTransient();
+    
     geom = original_geometry;
     bool placementDone = FALSE;
@@ -1410,13 +1403,5 @@ bool Client::propertyNotify( XPropertyEv
         break;
     case XA_WM_TRANSIENT_FOR:
-        Window ww;
-        if ( !XGetTransientForHint( qt_xdisplay(), (Window) win, &ww ) ) {
-            transient_for = None;
-            transient_for_defined = FALSE;
-        } else {
-            transient_for = (WId) ww;
-            transient_for_defined = TRUE;
-            verifyTransientFor();
-        }
+        getTransient();
         break;
     case XA_WM_HINTS:
@@ -2716,5 +2701,5 @@ void Client::setMask( const QRegion & re
 Client* Client::mainClient()
 {
-    if  ( !isTransient() && transientFor() != 0 )
+    if  ( !isTransient() || transientFor() == 0 )
         return this;
     ClientList saveset;
@@ -2731,4 +2716,16 @@ Client* Client::mainClient()
 }
 
+void Client::getTransient()
+{
+    Window ww;
+    if ( !XGetTransientForHint( qt_xdisplay(), (Window) win, &ww ) ) {
+        transient_for = None;
+        transient_for_defined = FALSE;
+    } else {
+        transient_for = (WId) ww;
+        transient_for_defined = TRUE;
+        verifyTransientFor();
+    }
+}
 
 /*!

--- kdebase/kwin/client.h  #1.90:1.91
@@ -290,4 +290,5 @@ private:
     void getWmNormalHints();
     void fetchName();
+    void getTransient();
     static bool resourceMatch( Client* c1, Client* c2 );
 


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic