summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@osg.samsung.com>2015-07-31 13:55:44 -0400
committerMike Blumenkrantz <zmike@osg.samsung.com>2015-07-31 13:58:52 -0400
commit20ef74ccc55fe0410d5633b579bda9f73c082994 (patch)
treef1e35e648dbf2928cc3103a0d5a4ffd5da0c1513
parenteea696f9d8dd8d6f2a61127f088b38fa62c508ac (diff)
defer focus-setting on focus revert during desk flip when visibility is pending
in the case that a client is going to be shown on the next loop iteration, focus setting must still occur and be deferred this fixes the case of a window appearing on a desk while the user is switching desks away from it even though this window is attempting to focus itself
-rw-r--r--src/bin/e_desk.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/bin/e_desk.c b/src/bin/e_desk.c
index f1cba9b3f..f4a8d7644 100644
--- a/src/bin/e_desk.c
+++ b/src/bin/e_desk.c
@@ -382,7 +382,7 @@ e_desk_last_focused_focus(E_Desk *desk)
382 382
383 EINA_LIST_FOREACH(e_client_focus_stack_get(), l, ec) 383 EINA_LIST_FOREACH(e_client_focus_stack_get(), l, ec)
384 { 384 {
385 if ((!ec->iconic) && (evas_object_visible_get(ec->frame)) && 385 if ((!ec->iconic) && (evas_object_visible_get(ec->frame) || ec->changes.visible) &&
386 ((ec->desk == desk) || ((ec->zone == desk->zone) && ec->sticky)) && 386 ((ec->desk == desk) || ((ec->zone == desk->zone) && ec->sticky)) &&
387 (ec->icccm.accepts_focus || ec->icccm.take_focus) && 387 (ec->icccm.accepts_focus || ec->icccm.take_focus) &&
388 (ec->netwm.type != E_WINDOW_TYPE_DOCK) && 388 (ec->netwm.type != E_WINDOW_TYPE_DOCK) &&
@@ -399,16 +399,22 @@ e_desk_last_focused_focus(E_Desk *desk)
399 ecs = ec; 399 ecs = ec;
400 continue; 400 continue;
401 } 401 }
402 e_client_focus_set_with_pointer(ec); 402 if (ec->changes.visible)
403 ec->want_focus = ec->take_focus = 1;
404 else
405 e_client_focus_set_with_pointer(ec);
403 if (e_config->raise_on_revert_focus) 406 if (e_config->raise_on_revert_focus)
404 evas_object_raise(ec->frame); 407 evas_object_raise(ec->frame);
405 return ec; 408 return ec;
406 } 409 }
407 } 410 }
408 } 411 }
409 if (ecs && evas_object_visible_get(ecs->frame)) 412 if (ecs)
410 { 413 {
411 e_client_focus_set_with_pointer(ecs); 414 if (ecs->changes.visible)
415 ecs->want_focus = ecs->take_focus = 1;
416 else
417 e_client_focus_set_with_pointer(ecs);
412 if (e_config->raise_on_revert_focus) 418 if (e_config->raise_on_revert_focus)
413 evas_object_raise(ecs->frame); 419 evas_object_raise(ecs->frame);
414 return ecs; 420 return ecs;