#include "rxvt.h" /* NECESSARY */
#include "rxvtutil.h"
#include "init.h"
+#include "keyboard.h"
#include <limits>
return cmd_argv;
}
+/*----------------------------------------------------------------------*/
+void
+rxvt_term::init (int argc, const char *const *argv, stringvec *envv)
+{
+ this->envv = envv;
+
+ SET_R (this);
+ set_locale ("");
+ set_environ (envv); // few things in X do not call setlocale :(
+
+ init_vars ();
+
+ init_secondary ();
+
+ const char **cmd_argv = init_resources (argc, argv);
+
+#ifdef KEYSYM_RESOURCE
+ keyboard->register_done ();
+#endif
+
+#ifdef HAVE_SCROLLBARS
+ if (option (Opt_scrollBar))
+ scrollBar.setIdle (); /* set existence for size calculations */
+#endif
+
+ pty = ptytty::create ();
+
+ create_windows (argc, argv);
+
+ init_xlocale ();
+
+ scr_reset (); // initialize screen
+
+#if 0
+ XSynchronize (dpy, True);
+#endif
+
+#ifdef HAVE_SCROLLBARS
+ if (option (Opt_scrollBar))
+ resize_scrollbar (); /* create and map scrollbar */
+#endif
+#ifdef HAVE_BG_PIXMAP
+ {
+ bgPixmap.set_target (this);
+ bgPixmap.invalidate ();
+
+#ifdef ENABLE_TRANSPARENCY
+ if (option (Opt_transparent))
+ {
+ bgPixmap.set_transparent ();
+
+#ifdef HAVE_AFTERIMAGE
+ if (rs [Rs_blurradius])
+ bgPixmap.set_blur_radius (rs [Rs_blurradius]);
+#endif
+ if (ISSET_PIXCOLOR (Color_tint))
+ bgPixmap.set_tint (pix_colors_focused [Color_tint]);
+
+ if (rs [Rs_shade])
+ bgPixmap.set_shade (rs [Rs_shade]);
+
+ bgPixmap.set_root_pixmap ();
+ XSelectInput (dpy, display->root, PropertyChangeMask);
+ rootwin_ev.start (display, display->root);
+ }
+#endif
+
+#ifdef BG_IMAGE_FROM_FILE
+ if (rs[Rs_backgroundPixmap])
+ {
+ const char *p = rs[Rs_backgroundPixmap];
+
+ if ((p = strchr (p, ';')) != 0)
+ {
+ p++;
+ bgPixmap.set_geometry (p);
+ }
+ else
+ bgPixmap.set_defaultGeometry ();
+
+ if (bgPixmap.set_file (rs[Rs_backgroundPixmap]))
+ if (!bgPixmap.window_position_sensitive ())
+ update_background ();
+ }
+#endif
+ }
+#endif
+
+#if ENABLE_PERL
+ rootwin_ev.start (display, display->root);
+#endif
+
+ set_colorfgbg ();
+
+ init_command (cmd_argv);
+
+ free (cmd_argv);
+
+ if (pty->pty >= 0)
+ pty_ev.start (pty->pty, ev::READ);
+
+ HOOK_INVOKE ((this, HOOK_START, DT_END));
+
+#if ENABLE_XEMBED
+ if (rs[Rs_embed])
+ {
+ long info[2] = { 0, XEMBED_MAPPED };
+
+ XChangeProperty (dpy, parent[0], xa[XA_XEMBED_INFO], xa[XA_XEMBED_INFO],
+ 32, PropModeReplace, (unsigned char *)&info, 2);
+ }
+#endif
+
+ XMapWindow (dpy, vt);
+ XMapWindow (dpy, parent[0]);
+
+ refresh_check ();
+}
+
/*----------------------------------------------------------------------*/
void
rxvt_term::init_env ()
_exit (EXIT_FAILURE);
}
-/*----------------------------------------------------------------------*/
-void
-rxvt_term::init (int argc, const char *const *argv, stringvec *envv)
-{
- this->envv = envv;
-
- SET_R (this);
- set_locale ("");
- set_environ (envv); // few things in X do not call setlocale :(
-
- init_vars ();
-
- init_secondary ();
-
- const char **cmd_argv = init_resources (argc, argv);
-
-#ifdef KEYSYM_RESOURCE
- keyboard->register_done ();
-#endif
-
-#ifdef HAVE_SCROLLBARS
- if (option (Opt_scrollBar))
- scrollBar.setIdle (); /* set existence for size calculations */
-#endif
-
- pty = ptytty::create ();
-
- create_windows (argc, argv);
-
- init_xlocale ();
-
- scr_reset (); // initialize screen
-
-#if 0
- XSynchronize (dpy, True);
-#endif
-
-#ifdef HAVE_SCROLLBARS
- if (option (Opt_scrollBar))
- resize_scrollbar (); /* create and map scrollbar */
-#endif
-#ifdef HAVE_BG_PIXMAP
- {
- bgPixmap.set_target (this);
- bgPixmap.invalidate ();
-
-#ifdef ENABLE_TRANSPARENCY
- if (option (Opt_transparent))
- {
- bgPixmap.set_transparent ();
-
-#ifdef HAVE_AFTERIMAGE
- if (rs [Rs_blurradius])
- bgPixmap.set_blur_radius (rs [Rs_blurradius]);
-#endif
- if (ISSET_PIXCOLOR (Color_tint))
- bgPixmap.set_tint (pix_colors_focused [Color_tint]);
-
- if (rs [Rs_shade])
- bgPixmap.set_shade (rs [Rs_shade]);
-
- bgPixmap.set_root_pixmap ();
- XSelectInput (dpy, display->root, PropertyChangeMask);
- rootwin_ev.start (display, display->root);
- }
-#endif
-
-#ifdef BG_IMAGE_FROM_FILE
- if (rs[Rs_backgroundPixmap])
- {
- const char *p = rs[Rs_backgroundPixmap];
-
- if ((p = strchr (p, ';')) != 0)
- {
- p++;
- bgPixmap.set_geometry (p);
- }
- else
- bgPixmap.set_defaultGeometry ();
-
- if (bgPixmap.set_file (rs[Rs_backgroundPixmap]))
- if (!bgPixmap.window_position_sensitive ())
- update_background ();
- }
-#endif
- }
-#endif
-
-#if ENABLE_PERL
- rootwin_ev.start (display, display->root);
-#endif
-
- set_colorfgbg ();
-
- init_command (cmd_argv);
-
- free (cmd_argv);
-
- if (pty->pty >= 0)
- pty_ev.start (pty->pty, ev::READ);
-
- HOOK_INVOKE ((this, HOOK_START, DT_END));
-
-#if ENABLE_XEMBED
- if (rs[Rs_embed])
- {
- long info[2] = { 0, XEMBED_MAPPED };
-
- XChangeProperty (dpy, parent[0], xa[XA_XEMBED_INFO], xa[XA_XEMBED_INFO],
- 32, PropModeReplace, (unsigned char *)&info, 2);
- }
-#endif
-
- XMapWindow (dpy, vt);
- XMapWindow (dpy, parent[0]);
-
- refresh_check ();
-}
-
static struct sig_handlers
{
ev::sig sw_term, sw_int;
void init_vars ();
void init_secondary ();
const char **init_resources (int argc, const char *const *argv);
+ void init (int argc, const char *const *argv, stringvec *envv);
void init_env ();
void set_locale (const char *locale);
void init_xlocale ();
~rxvt_term ();
void destroy ();
void emergency_cleanup ();
- void init (int argc, const char *const *argv, stringvec *envv);
void recolour_cursor ();
void resize_all_windows (unsigned int newwidth, unsigned int newheight, int ignoreparent);
void window_calc (unsigned int newwidth, unsigned int newheight);