-- 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: 73c2911ae76979839c34089bfdfcda2a6c6146bd:
path_to:
revision_to:

git.thebackupbox.net

rxvt-unicode-sixel

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

commit 73c2911ae76979839c34089bfdfcda2a6c6146bd
Author: Emanuele Giaquinta <emanuele.giaquinta@gmail.com>
Date:   Mon Dec 31 12:05:34 2012 +0000

    Inline two methods in their callers.

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

index 7960e0f8de3782fe8297fecdf0a4d84d2b558b95..

index ..6506e4641787f6073e25688ecdbeb742b85b2391 100644

--- a/src/background.C
+++ b/src/background.C
@@ -253,8 +253,8 @@ rxvt_image::set_geometry (const char *geom, bool update)
   return changed;
 }

-void
-rxvt_term::get_image_geometry (rxvt_image &image, int &w, int &h, int &x, int &y)
+bool
+rxvt_term::render_image (rxvt_image &image)
 {
   int image_width = image.img->w;
   int image_height = image.img->h;
@@ -263,6 +263,11 @@ rxvt_term::get_image_geometry (rxvt_image &image, int &w, int &h, int &x, int &y
   int h_scale = min (image.h_scale, 32767 * 100 / parent_width);
   int v_scale = min (image.v_scale, 32767 * 100 / parent_height);

+  int w;
+  int h;
+  int x;
+  int y;
+
   w = h_scale * parent_width / 100;
   h = v_scale * parent_height / 100;

@@ -287,20 +292,6 @@ rxvt_term::get_image_geometry (rxvt_image &image, int &w, int &h, int &x, int &y
       x = make_align_position (image.h_align, parent_width, w);
       y = make_align_position (image.v_align, parent_height, h);
     }
-}
-
-bool
-rxvt_term::render_image (rxvt_image &image)
-{
-  int parent_width = szHint.width;
-  int parent_height = szHint.height;
-
-  int x = 0;
-  int y = 0;
-  int w = 0;
-  int h = 0;
-
-  get_image_geometry (image, w, h, x, y);

   if (!(image.flags & IM_ROOT_ALIGN)
       && (x >= parent_width
@@ -482,13 +473,6 @@ rxvt_term::render_root_image ()

   return true;
 }
-
-void
-rxvt_term::bg_set_root_pixmap ()
-{
-  delete root_img;
-  root_img = rxvt_img::new_from_root (this);
-}
 # endif /* BG_IMAGE_FROM_ROOT */

 void
@@ -536,7 +520,7 @@ rxvt_term::bg_init ()
       if (rs [Rs_shade])
         root_effects.set_shade (rs [Rs_shade]);

-      bg_set_root_pixmap ();
+      rxvt_img::new_from_root (this)->replace (root_img);
       XSelectInput (dpy, display->root, PropertyChangeMask);
       rootwin_ev.start (display, display->root);
     }
diff --git a/src/command.C b/src/command.C

index 23dc463427eb323931c2ffa19d379a488d05347b..

index ..277b6e37f783a9e54dec1128a0466e831a29ab00 100644

--- a/src/command.C
+++ b/src/command.C
@@ -1858,7 +1858,7 @@ rxvt_term::rootwin_cb (XEvent &ev)
 #if BG_IMAGE_FROM_ROOT
             if (option (Opt_transparent))
               {
-                bg_set_root_pixmap ();
+                rxvt_img::new_from_root (this)->replace (root_img);
                 update_background ();
               }
 #endif
diff --git a/src/rxvt.h b/src/rxvt.h

index b3ae7a117e8c8bc69497d3deadeb41b6c6efbdf1..

index ..d524abc85f6cbf523e98d53e7d6780cea62f1f53 100644

--- a/src/rxvt.h
+++ b/src/rxvt.h
@@ -1190,7 +1190,6 @@ struct rxvt_term : zero_initialized, rxvt_vars, rxvt_screen

 # if BG_IMAGE_FROM_FILE
   rxvt_image fimage;
-  void get_image_geometry (rxvt_image &image, int &w, int &h, int &x, int &y);
   bool render_image (rxvt_image &image);
 # endif

@@ -1198,7 +1197,6 @@ struct rxvt_term : zero_initialized, rxvt_vars, rxvt_screen
   rxvt_img *root_img;
   image_effects root_effects;

-  void bg_set_root_pixmap ();
   bool render_root_image ();
 # endif

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

-- Response ended

-- Page fetched on Sun Jun 2 10:07:42 2024