bu5hm4n pushed a commit to branch master.

http://git.enlightenment.org/core/enlightenment.git/commit/?id=37be0cf885d77a9140d3fa078ed5eae3cf6a2060

commit 37be0cf885d77a9140d3fa078ed5eae3cf6a2060
Author: Marcel Hollerbach <[email protected]>
Date:   Fri Mar 10 12:04:38 2017 +0100

    tiling: handle the tiling state correctly when on multimonitor
    
    there is no event that indicates that the mouse went to a other zone. To
    solve this we simply update the current split type each time when
    changing or using the type.
---
 src/modules/tiling/e_mod_tiling.c | 25 +++++++++++++++++++------
 1 file changed, 19 insertions(+), 6 deletions(-)

diff --git a/src/modules/tiling/e_mod_tiling.c 
b/src/modules/tiling/e_mod_tiling.c
index 80654c8..8ab1a08 100644
--- a/src/modules/tiling/e_mod_tiling.c
+++ b/src/modules/tiling/e_mod_tiling.c
@@ -72,6 +72,7 @@ static void             _foreach_desk(void (*func)(E_Desk 
*desk));
 static Eina_Bool _toggle_tiling_based_on_state(E_Client *ec, Eina_Bool 
restore);
 static void _edje_tiling_icon_set(Evas_Object *o);
 static void _desk_config_apply(E_Desk *d, int old_nb_stacks, int 
new_nb_stacks);
+static void _update_current_desk(E_Desk *new);
 
 /* Func Proto Requirements for Gadcon */
 static E_Gadcon_Client *_gc_init(E_Gadcon *gc, const char *name, const char 
*id, const char *style);
@@ -144,6 +145,9 @@ get_current_desk(void)
 static Tiling_Split_Type
 _current_tiled_state(Eina_Bool allow_float)
 {
+   //update the current desk in case something has changed it
+   _update_current_desk(get_current_desk());
+
    if (!_G.current_split_type)
      {
         ERR("Invalid state, the current field can never be NULL");
@@ -1050,11 +1054,23 @@ _tiling_split_type_changed_popup(void)
 }
 
 static void
-_tiling_split_type_next(void)
+_tiling_gadgets_update(void)
 {
    Instance *inst;
    Eina_List *itr;
 
+   EINA_LIST_FOREACH(tiling_g.gadget_instances, itr, inst)
+     {
+        _gadget_icon_set(inst);
+     }
+}
+
+static void
+_tiling_split_type_next(void)
+{
+   //update the current desk in case something has changed it
+   _update_current_desk(get_current_desk());
+
    if (!_G.current_split_type)
      {
         ERR("Invalid state, current split type is NULL");
@@ -1070,11 +1086,7 @@ _tiling_split_type_next(void)
         _G.current_split_type->type = (_G.current_split_type->type + 1) % 
TILING_SPLIT_LAST;
      }
 
-   EINA_LIST_FOREACH(tiling_g.gadget_instances, itr, inst)
-     {
-        _gadget_icon_set(inst);
-     }
-
+   _tiling_gadgets_update();
    _tiling_split_type_changed_popup();
 }
 
@@ -1692,6 +1704,7 @@ _desk_shown(void *data EINA_UNUSED, int types 
EINA_UNUSED, void *event_info)
      }
 
    _update_current_desk(ev->desk);
+   _tiling_gadgets_update();
 }
 
 E_API void *

-- 


Reply via email to