e17: disable pointer warp on _net_active_window client message
authorHannes Janetzek <hannes.janetzek@gmail.com>
Tue, 8 Mar 2011 23:09:09 +0000 (23:09 +0000)
committerHannes Janetzek <hannes.janetzek@gmail.com>
Tue, 8 Mar 2011 23:09:09 +0000 (23:09 +0000)
SVN revision: 57608

src/bin/e_manager.c

index a15188d..ca61b07 100644 (file)
@@ -969,8 +969,15 @@ _e_manager_cb_client_message(void *data __UNUSED__, int ev_type __UNUSED__, void
                  if (!bd->lock_user_stacking) e_border_raise(bd);
                  if (!bd->lock_focus_out)
                    {
-                      if (e_config->focus_policy != E_FOCUS_CLICK)
-                        ecore_x_pointer_warp(bd->zone->container->win,
+                      int requestor_id = e->data.l[2];
+                      /* FIXME for now only set pointer when not
+                      requested by a client. ooffice does send this
+                      request for dialogs which should be modal when
+                      the main window gets focus. causing the pointer
+                      to jump back and forth. are there any other
+                      apps that use _net_active_window ? */
+                      if ((requestor_id == 2) && (e_config->focus_policy != E_FOCUS_CLICK))
+                        ecore_x_pointer_warp(bd->zone->container->win,
                                              bd->x + (bd->w / 2), bd->y + (bd->h / 2));
                       e_border_focus_set(bd, 1, 1);
                    }