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

List:       kde-core-devel
Subject:    kwin patches
From:       Antonio Larrosa <antlarr () arrakis ! es>
Date:       2000-10-02 1:17:32
[Download RAW message or body]

Hi,

This patch fixes :
1) Making sticky a window which is not in the current desktop doesn't
paint the window in the current desktop.

2) Using alt-mmb to lower a window gives the focus to the next window in the
stacking order, instead of :
    1. give the focus to the window under the mouse if using any of the
	focus-follow-mouse modes
    2. keep the focus if using click-to-focus mode.

Please review them. I've tested them and they seem to work ok, so if nobody
objects, Matthias (Elter or Ettrich) please commit them before making the
snapshots.

Greetings,

--
Antonio Larrosa Jimenez
KDE Core developer
antonio@larrosa.org        larrosa@kde.org
http://www.larrosa.org
KDE - The development framework of the future, today.
["client.cpp.diff" (text/plain)]

Index: client.cpp
===================================================================
RCS file: /home/kde/kdebase/kwin/client.cpp,v
retrieving revision 1.167
diff -u -r1.167 client.cpp
--- client.cpp	2000/09/29 18:14:45	1.167
+++ client.cpp	2000/10/02 01:15:07
@@ -1989,6 +1989,8 @@
 	info->setDesktop( NETWinInfo::OnAllDesktops );
     workspace()->setStickyTransientsOf( this, b );
     stickyChange( is_sticky );
+
+    if ( is_sticky && desk!=-1 ) show();
 }
 
 

["workspace.cpp.diff" (text/plain)]

Index: workspace.cpp
===================================================================
RCS file: /home/kde/kdebase/kwin/workspace.cpp,v
retrieving revision 1.175
diff -u -r1.175 workspace.cpp
--- workspace.cpp	2000/09/29 15:54:18	1.175
+++ workspace.cpp	2000/10/02 01:17:51
@@ -1608,10 +1608,24 @@
 
     propagateClients( TRUE );
 
-    if (dropFocus ) {
-	Client* top = topClientOnDesktop();
-	if ( top )
-	    requestFocus( top);
+    if (dropFocus && options->focusPolicy!=Options::ClickToFocus) {
+      //	Client* top = topClientOnDesktop();
+        /* get the window under the mouse and make it get the focus */
+        Window root;
+        Window child = qt_xrootwin();
+        int root_x, root_y, lx, ly;
+        uint state;
+        Window w;
+        Client * c = 0;
+        do {
+	  w = child;
+	  if (!c)
+	    c = findClientWidthId( w );
+	  XQueryPointer( qt_xdisplay(), w, &root, &child,
+	      &root_x, &root_y, &lx, &ly, &state );
+        } while  ( child != None && child != w );                                   
+	if ( c )
+	    requestFocus( c );
     }
 }
 


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

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