From a8ed24cd6130483121df8ab88e134c8f898e8298 Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Sun, 10 Jun 2007 16:22:55 +0000 Subject: [PATCH] merge r7474-78 from trunk --- data/autostart.sh | 8 -------- openbox/action.c | 14 +++++++------- openbox/client.c | 12 +++++++----- openbox/event.c | 20 +++++++------------- 4 files changed, 21 insertions(+), 33 deletions(-) diff --git a/data/autostart.sh b/data/autostart.sh index f8b804c6..4c635202 100644 --- a/data/autostart.sh +++ b/data/autostart.sh @@ -30,11 +30,3 @@ fi if which start_kdeinit >/dev/null; then LD_BIND_NOW=true start_kdeinit --new-startup +kcminit_startup & fi - -# Support for SCIM -if which scim >/dev/null; then - export XMODIFIERS=@im=SCIM - export GTK_IM_MODULE=scim - export QT_IM_MODULE=scim - scim -d & -fi diff --git a/openbox/action.c b/openbox/action.c index 2b80f1df..bf675233 100644 --- a/openbox/action.c +++ b/openbox/action.c @@ -1466,21 +1466,21 @@ void action_move_relative(union ActionData *data) void action_resize_relative(union ActionData *data) { ObClient *c = data->relative.any.c; - gint x, y, ow, w, oh, h, lw, lh; + gint x, y, w1, w2, h1, h2, lw, lh; client_action_start(data); x = c->area.x; y = c->area.y; - ow = c->area.width; - w = ow + data->relative.deltax * c->size_inc.width + w1 = c->area.width + data->relative.deltax * c->size_inc.width; + w2 = c->area.width + data->relative.deltax * c->size_inc.width + data->relative.deltaxl * c->size_inc.width; - oh = c->area.height; - h = oh + data->relative.deltay * c->size_inc.height + h1 = c->area.height + data->relative.deltay * c->size_inc.height; + h2 = c->area.height + data->relative.deltay * c->size_inc.height + data->relative.deltayu * c->size_inc.height; - client_try_configure(c, &x, &y, &w, &h, &lw, &lh, TRUE); - client_move_resize(c, x + (ow - w), y + (oh - h), w, h); + client_try_configure(c, &x, &y, &w2, &h2, &lw, &lh, TRUE); + client_move_resize(c, x + (w1 - w2), y + (h1 - h2), w2, h2); client_action_end(data, FALSE); } diff --git a/openbox/client.c b/openbox/client.c index 634b5180..dbe203a6 100644 --- a/openbox/client.c +++ b/openbox/client.c @@ -3570,17 +3570,19 @@ void client_activate(ObClient *self, gboolean here, gboolean user) guint32 last_time = focus_client ? focus_client->user_time : CurrentTime; gboolean allow = FALSE; - /* if the request came from the user, or if nothing is focused, then grant - the request. - if the currently focused app doesn't set a user_time, then it can't + /* if the currently focused app doesn't set a user_time, then it can't benefit from any focus stealing prevention. + + if the timestamp is missing in the request then let it go through + even if it is source=app, because EVERY APPLICATION DOES THIS because + GTK IS VERY BUGGY AND HARDCODES source=application... WHY!? */ - if (user || !focus_client || !last_time) + if (!last_time || !event_curtime) allow = TRUE; /* otherwise, if they didn't give a time stamp or if it is too old, they don't get focus */ else - allow = event_curtime && event_time_after(event_curtime, last_time); + allow = event_time_after(event_curtime, last_time); ob_debug_type(OB_DEBUG_FOCUS, "Want to activate window 0x%x with time %u (last time %u), " diff --git a/openbox/event.c b/openbox/event.c index fa83c29e..2d44bc51 100644 --- a/openbox/event.c +++ b/openbox/event.c @@ -1158,8 +1158,9 @@ static void event_handle_client(ObClient *client, XEvent *e) notify is sent or not */ } - if (move || resize) { + { gint lw,lh; + gulong ignore_start; client_try_configure(client, &x, &y, &w, &h, &lw, &lh, FALSE); @@ -1176,18 +1177,11 @@ static void event_handle_client(ObClient *client, XEvent *e) client_find_onscreen(client, &x, &y, w, h, FALSE); - /* if they requested something that moves the window, or if - the window is actually being changed then configure it and - send a configure notify to them */ - if (move || !RECT_EQUAL_DIMS(client->area, x, y, w, h)) { - gulong ignore_start; - - ob_debug("Granting ConfigureRequest x %d y %d w %d h %d\n", - x, y, w, h); - ignore_start = event_start_ignore_all_enters(); - client_configure(client, x, y, w, h, FALSE, TRUE); - event_end_ignore_all_enters(ignore_start); - } + ob_debug("Granting ConfigureRequest x %d y %d w %d h %d\n", + x, y, w, h); + ignore_start = event_start_ignore_all_enters(); + client_configure(client, x, y, w, h, FALSE, TRUE); + event_end_ignore_all_enters(ignore_start); } break; } -- 2.34.1