-- Leo's gemini proxy

-- Connecting to git.thebackupbox.net:1965...

-- Connected

-- Sending request

-- Meta line: 20 text/gemini

repo: rxvt-unicode-sixel
action: commit
revision:
path_from:
revision_from: 30d1db266920c3972dfcc6937bcbe50e716114a6:
path_to:
revision_to:

git.thebackupbox.net

rxvt-unicode-sixel

git://git.thebackupbox.net/rxvt-unicode-sixel

commit 30d1db266920c3972dfcc6937bcbe50e716114a6
Author: Emanuele Giaquinta <emanuele.giaquinta@gmail.com>
Date:   Mon Feb 18 09:58:05 2008 +0000

    Move the resize of the scrollbar window in scrollbar_resize.

diff --git a/src/main.C b/src/main.C

index b1cf9b71deb3825ebd48be7b9acc820eaba1b734..

index ..42beb6347710f454bc8bf4a474aa98428ddb3ed3 100644

--- a/src/main.C
+++ b/src/main.C
@@ -527,7 +527,7 @@ void
 rxvt_term::window_calc (unsigned int newwidth, unsigned int newheight)
 {
   short recalc_x, recalc_y;
-  int x, y, sb_w, flags;
+  int x, y, flags;
   unsigned int w, h;
   unsigned int max_width, max_height;

@@ -594,12 +594,11 @@ rxvt_term::window_calc (unsigned int newwidth, unsigned int newheight)

   szHint.base_width = szHint.base_height = 2 * int_bwidth;

-  sb_w = 0;
   window_vt_x = window_vt_y = int_bwidth;

   if (scrollBar.state)
     {
-      sb_w = scrollBar.total_width ();
+      int sb_w = scrollBar.total_width ();
       szHint.base_width += sb_w;

       if (!option (Opt_scrollBar_right))
@@ -633,9 +632,6 @@ rxvt_term::window_calc (unsigned int newwidth, unsigned int newheight)
       szHint.height = szHint.base_height + height;
     }

-  if (scrollBar.state && option (Opt_scrollBar_right))
-    window_sb_x = szHint.width - sb_w;
-
   if (recalc_x)
     szHint.x += DisplayWidth  (dpy, display->screen) - szHint.width  - 2 * ext_bwidth;

@@ -984,12 +980,7 @@ rxvt_term::resize_all_windows (unsigned int newwidth, unsigned int newheight, in
   if (fix_screen || newwidth != old_width || newheight != old_height)
     {
       if (scrollBar.state)
-        {
-          XMoveResizeWindow (dpy, scrollBar.win,
-                             window_sb_x, 0,
-                             scrollBar.total_width (), szHint.height);
-          resize_scrollbar ();
-        }
+        resize_scrollbar ();

       XMoveResizeWindow (dpy, vt,
                          window_vt_x, window_vt_y,
diff --git a/src/rxvt.h b/src/rxvt.h

index 65d434146eda91492b5927168c07550aea4d560f..

index ..efc70f237ad17423c7d4912876b25b01008bf7e7 100644

--- a/src/rxvt.h
+++ b/src/rxvt.h
@@ -992,7 +992,6 @@ struct rxvt_term : zero_initialized, rxvt_vars, rxvt_screen {
                   refresh_count,
                   window_vt_x,
                   window_vt_y,
-                  window_sb_x,
                   mouse_row,
                   mouse_col,
 # ifdef POINTER_BLANK
diff --git a/src/scrollbar.C b/src/scrollbar.C

index 9cf828bc7d9a619f03dac8a6ae4fbfcada79694d..

index ..fb79d4fa8e413766e24a6cbbf11c2cb855dc1650 100644

--- a/src/scrollbar.C
+++ b/src/scrollbar.C
@@ -63,6 +63,10 @@ void
 rxvt_term::resize_scrollbar ()
 {
   int delayed_init = 0;
+  int window_sb_x = 0;
+
+  if (option (Opt_scrollBar_right))
+    window_sb_x = szHint.width - scrollBar.total_width ();

 #define R_SCROLLBEG_XTERM	0
 #define R_SCROLLEND_XTERM	szHint.height
@@ -127,6 +131,10 @@ rxvt_term::resize_scrollbar ()

       delayed_init = 1;
     }
+  else
+    XMoveResizeWindow (dpy, scrollBar.win,
+                       window_sb_x, 0,
+                       scrollBar.total_width (), szHint.height);

   scrollbar_show (1);

-----END OF PAGE-----

-- Response ended

-- Page fetched on Sun Jun 2 13:08:31 2024