From 9a826d8c3d61150ddd72c621aab870d4bfe4594f Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Mon, 17 May 2010 20:10:06 -0400 Subject: 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 --- openbox/openbox.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'openbox/openbox.c') 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), -- cgit v1.2.3