summaryrefslogtreecommitdiff
path: root/openbox/openbox.c
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2010-05-17 20:10:06 -0400
committerDana Jansens <danakj@orodu.net>2010-05-17 20:10:31 -0400
commit9a826d8c3d61150ddd72c621aab870d4bfe4594f (patch)
tree45a50d72d37cce90b353ae94c7caa6565d769b9a /openbox/openbox.c
parentab7673c8167d94bdb93bd9905d6265dd3bf727b3 (diff)
fix focus when starting up, especially when replacing another instance of openbox
adds a function event_reset_time() that forces event_time() to look for a new (future) timestamp
Diffstat (limited to 'openbox/openbox.c')
-rw-r--r--openbox/openbox.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/openbox/openbox.c b/openbox/openbox.c
index 4703d7d6..fb43b978 100644
--- a/openbox/openbox.c
+++ b/openbox/openbox.c
@@ -213,6 +213,11 @@ gint main(gint argc, gchar **argv)
XC_top_left_corner);
if (screen_annex()) { /* it will be ours! */
+
+ /* get a timestamp from after taking over as the WM. if we use the
+ old timestamp to set focus it can fail when replacing another WM. */
+ event_reset_time();
+
do {
ObPrompt *xmlprompt = NULL;
@@ -317,7 +322,6 @@ gint main(gint argc, gchar **argv)
/* get all the existing windows */
window_manage_all();
- focus_nothing();
/* focus what was focused if a wm was already running */
if (OBT_PROP_GET32(obt_root(ob_screen),