Patch to run ratpoison with a kde plasma desktop

Ingo Krabbe <[email protected]>
Newsgroups gmane.comp.window-managers.ratpoison.devel
Message-ID <20110206222525.GA20819@ask-laptop>
Hi,

here is a small patch that seems to work quite well using ratpoison as a
window manager for the KDE4 plasma-desktop.

The full thing is described in this blog:

http://develop-for-world-domination.blogspot.com/2011/02/howto-use-ratpoison-as-window-manager.html

bye ingo

_______________________________________________
Ratpoison-devel mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/ratpoison-devel
0001-change-configure-requests-for-kde-plasma-desktop.patch (text/plain, 2.6 KB)
From 58bf30c380183b929cc55b53196ad41936049bbf Mon Sep 17 00:00:00 2001
From: Ingo Krabbe <[email protected]>
Date: Sun, 6 Feb 2011 23:11:12 +0100
Subject: [PATCH] change configure requests for kde plasma desktop

---
 src/events.c |   33 +++++++++++++++++++++++++++------
 1 files changed, 27 insertions(+), 6 deletions(-)

diff --git a/src/events.c b/src/events.c
index 0a5d759..4ec7169 100644
--- a/src/events.c
+++ b/src/events.c
@@ -279,8 +279,24 @@ configure_request (XConfigureRequestEvent *e)
                 }
 
             }
-
-          PRINT_DEBUG(("request CWStackMode %d\n", e->detail));
+	  else if (win->state==WithdrawnState) {
+	      /* honour the configure request, anyway */
+	      if (e->value_mask & CWX) changes.x = e->x;
+	      if (e->value_mask & CWY) changes.y = e->y;
+	      if (e->value_mask & CWWidth) changes.width = e->width;
+	      if (e->value_mask & CWHeight) changes.height = e->height;
+	      if (e->value_mask & CWBorderWidth) changes.border_width = e->border_width;
+	      if (e->value_mask & CWStackMode) changes.stack_mode = e->detail;
+	      if (e->value_mask & CWSibling) changes.sibling = e->above;
+	      XConfigureWindow (dpy, e->window,
+				e->value_mask & (CWX|CWY|CWBorderWidth|CWWidth
+					|CWHeight|CWStackMode|CWSibling),
+				&changes);
+	      PRINT_DEBUG(("request Unmapped stacking %x:%x(%d) \"%s\"\n",
+	      	(int)e->window, (int)e->above, e->detail, window_name(win) ));
+	  }
+	  PRINT_DEBUG(("request CWStackMode %d %d!=%d\n", e->detail,
+		win->state,WithdrawnState));
         }
 
       PRINT_DEBUG (("'%s' window size: %d %d %d %d %d\n", window_name (win),
@@ -335,13 +351,18 @@ configure_request (XConfigureRequestEvent *e)
     }
   else
     {
+
+	PRINT_DEBUG(("UNMANAGED CONFIGURATION %x\n"
+		"X=%5d\n" "Y=%5d\n",
+		(int)e->window, e->x, e->y
+	));
       /* Its an unmanaged window, so give it what it wants. But don't
          change the stack mode.*/
       if (e->value_mask & CWX) changes.x = e->x;
-      if (e->value_mask & CWY) changes.x = e->x;
-      if (e->value_mask & CWWidth) changes.x = e->x;
-      if (e->value_mask & CWHeight) changes.x = e->x;
-      if (e->value_mask & CWBorderWidth) changes.x = e->x;
+      if (e->value_mask & CWY) changes.y = e->y;
+      if (e->value_mask & CWWidth) changes.width = e->width;
+      if (e->value_mask & CWHeight) changes.height = e->height;
+      if (e->value_mask & CWBorderWidth) changes.border_width = e->border_width;
       XConfigureWindow (dpy, e->window,
                         e->value_mask & (CWX|CWY|CWBorderWidth|CWWidth|CWHeight),
                         &changes);
-- 
1.7.4
signature.asc (application/pgp-signature, 198 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (GNU/Linux)

iEYEABECAAYFAk1PH9UACgkQXud8/AkECfkCbQCfZF9dxICO/Yxyfhmakevm04EG
kekAn0SNL1KL5lN7eA4fXxvcSEn/xV+r
=jYot
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.