merge r7474-78 from trunk
authorDana Jansens <danakj@orodu.net>
Sun, 10 Jun 2007 16:22:55 +0000 (16:22 +0000)
committerDana Jansens <danakj@orodu.net>
Sun, 10 Jun 2007 16:22:55 +0000 (16:22 +0000)
data/autostart.sh
openbox/action.c
openbox/client.c
openbox/event.c

index f8b804c6da0a47a02651f27e02151ed230b45398..4c6352029b3fd46eee0911ebb2a9f14abb9dfb72 100644 (file)
@@ -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
index 2b80f1df54e348f9553e310f37ca49578e0ea5b4..bf675233d58e40306bf22d321feb5659b6d13262 100644 (file)
@@ -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);
 }
 
index 634b5180c73ee0637044fcb3de07352458a6324a..dbe203a61f9645de377c672ff51786eeb08c7f5a 100644 (file)
@@ -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), "
index fa83c29e992b2ce027d468e0b28ede57da5513bc..2d44bc51090f2880dd5926e1db477daa16a02459 100644 (file)
@@ -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;
     }