-- 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: 8167c939b008b6526ebfa6cffc4a3cc73548d4fe:
path_to:
revision_to:

git.thebackupbox.net

rxvt-unicode-sixel

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

commit 8167c939b008b6526ebfa6cffc4a3cc73548d4fe
Author: Marc Lehmann <schmorp@schmorp.de>
Date:   Mon Feb 9 22:45:29 2004 +0000

    *** empty log message ***

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

index a20cead017b5717cdebfb928a27c02d589683e1e..

index ..c7d93c4787ab69f708ccc1606f83a523a6598518 100644

--- a/src/command.C
+++ b/src/command.C
@@ -1389,12 +1389,6 @@ rxvt_term::x_cb (XEvent &ev)
 #endif
         break;

-      case PropertyNotify:
-        if (ev.xproperty.atom == xa[XA_VT_SELECTION])
-          if (ev.xproperty.state == PropertyNewValue)
-            selection_property (ev.xproperty.window, ev.xproperty.atom);
-        break;
-
 #ifdef TRANSPARENT
       case ReparentNotify:
         rootwin_cb (ev);
@@ -1550,33 +1544,44 @@ rxvt_term::x_cb (XEvent &ev)
     }
 }

-#ifdef TRANSPARENT
 void
 rxvt_term::rootwin_cb (XEvent &ev)
 {
   SET_R (this);
   SET_LOCALE (locale);

-  if (ev.type == PropertyNotify)
+  switch (ev.type)
     {
-      /*
-       * if user used some Esetroot compatible prog to set the root bg,
-       * use the property to determine the pixmap.  We use it later on.
-       */
-      if (xa[XA_XROOTPMAPID] == 0)
-        xa[XA_XROOTPMAPID] = XInternAtom(display->display, "_XROOTPMAP_ID", False);
+      case PropertyNotify:
+        if (ev.xproperty.atom == xa[XA_VT_SELECTION])
+          {
+            if (ev.xproperty.state == PropertyNewValue)
+              selection_property (ev.xproperty.window, ev.xproperty.atom);
+            break;
+          }
+#ifdef TRANSPARENT
+        else
+          {
+            /*
+             * if user used some Esetroot compatible prog to set the root bg,
+             * use the property to determine the pixmap.  We use it later on.
+             */
+            if (xa[XA_XROOTPMAPID] == 0)
+              xa[XA_XROOTPMAPID] = XInternAtom(display->display, "_XROOTPMAP_ID", False);

-      if (ev.xproperty.atom != xa[XA_XROOTPMAPID])
-        return;
-    }
+            if (ev.xproperty.atom != xa[XA_XROOTPMAPID])
+              return;
+          }

-  if ((Options & Opt_transparent) && check_our_parents ())
-    {
-      if (am_transparent)
-        want_full_refresh = 1;
+        /* FALLTHROUGH */
+      case ReparentNotify:
+        if ((Options & Opt_transparent) && check_our_parents ())
+          if (am_transparent)
+            want_full_refresh = 1;
+        break;
+#endif
     }
 }
-#endif

 void
 rxvt_term::button_press (const XButtonEvent &ev)
diff --git a/src/main.C b/src/main.C

index ec98644d6afbec66938ab2ff75c62741a140107b..

index ..bfab382362e8b63bfdd29922793f3c5558feeaa3 100644

--- a/src/main.C
+++ b/src/main.C
@@ -74,9 +74,7 @@ rxvt_term::operator delete (void *p, size_t s)

 rxvt_term::rxvt_term ()
     :
-#ifdef TRANSPARENT
     rootwin_ev (this, &rxvt_term::rootwin_cb),
-#endif
     termwin_ev (this, &rxvt_term::x_cb),
     vt_ev (this, &rxvt_term::x_cb),
 #ifdef HAVE_SCROLLBARS
@@ -277,10 +275,12 @@ rxvt_term::init (int argc, const char *const *argv)
   if (Options & Opt_transparent)
     {
       XSelectInput (display->display, display->root, PropertyChangeMask);
-      rootwin_ev.start (display, display->root);
       check_our_parents ();
     }
 #endif
+
+  rootwin_ev.start (display, display->root);
+
   XMapWindow (display->display, TermWin.vt);
   XMapWindow (display->display, TermWin.parent[0]);

diff --git a/src/rxvt.h b/src/rxvt.h

index e028d1d27dba473e9865072299e70a323d94d31f..

index ..996de31303805f9f7ba1b7f48b91a1cfb851bdc1 100644

--- a/src/rxvt.h
+++ b/src/rxvt.h
@@ -1073,10 +1073,8 @@ struct rxvt_term : rxvt_vars {

   void flush ();

-#ifdef TRANSPARENT
   void rootwin_cb (XEvent &xev);
   xevent_watcher rootwin_ev;
-#endif

   void x_cb (XEvent &xev);
   xevent_watcher termwin_ev;

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

-- Response ended

-- Page fetched on Sun Jun 2 11:05:40 2024