ratpoison-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[RP] PATCH - frame indicator positioning


From: Doug Kearns
Subject: [RP] PATCH - frame indicator positioning
Date: Mon, 13 Dec 2004 15:14:08 +1100
User-agent: Mutt/1.4i

Shawn,

Here's a quick patch to make sure the frame indicator is drawn in the
same centred position as the bar. Now it sits nicely on top of the bar
if 'defbargravity' is set to centre and both are shown at the same time
eg. when changing workspaces using rpws ;-)

Regards,
Doug

Index: src/split.c
===================================================================
RCS file: /cvsroot/ratpoison/ratpoison/src/split.c,v
retrieving revision 1.55
diff -u -r1.55 split.c
--- src/split.c 4 Dec 2004 03:33:24 -0000       1.55
+++ src/split.c 13 Dec 2004 03:59:34 -0000
@@ -926,7 +926,7 @@
   frame = current_frame();
 
   width = defaults.bar_x_padding * 2 + XTextWidth (defaults.font, msg, strlen 
(msg));
-  height = (FONT_HEIGHT (defaults.font) + defaults.bar_y_padding * 2);
+  height = FONT_HEIGHT (defaults.font) + defaults.bar_y_padding * 2;
 
   /* We don't want another frame indicator to be displayed on another
    * screen at the same time, so we hide it before bringing it back again.
@@ -934,8 +934,8 @@
   hide_frame_indicator ();
 
   XMoveResizeWindow (dpy, s->frame_window,
-                    s->left + frame->x + frame->width / 2 - width / 2,
-                    s->top + frame->y + frame->height / 2 - height / 2,
+                    s->left + frame->x + (frame->width - width) / 2  - 
defaults.bar_border_width,
+                    s->top + frame->y + (frame->height - height) / 2 - 
defaults.bar_border_width,
                     width, height);
 
   XMapRaised (dpy, s->frame_window);





reply via email to

[Prev in Thread] Current Thread [Next in Thread]