#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);
}
}
-#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)
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
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]);