add E_Client->keyboard_resizing flag
authorMike Blumenkrantz <zmike@osg.samsung.com>
Wed, 15 Jul 2015 22:07:12 +0000 (18:07 -0400)
committerMike Blumenkrantz <zmike@osg.samsung.com>
Wed, 15 Jul 2015 22:07:12 +0000 (18:07 -0400)
there is no other indication of whether a client is resizing using the
keyboard, so this should serve as an adequate hint

src/bin/e_client.c
src/bin/e_client.h

index 8fe7719..d7eb573 100644 (file)
@@ -400,6 +400,8 @@ _e_client_action_finish(void)
    E_FREE_FUNC(action_timer, ecore_timer_del);
    E_FREE_FUNC(action_handler_key,  ecore_event_handler_del);
    E_FREE_FUNC(action_handler_mouse, ecore_event_handler_del);
+   if (action_client)
+     action_client->keyboard_resizing = 0;
    action_client = NULL;
 }
 
@@ -733,6 +735,8 @@ _e_client_action_init(E_Client *ec)
    action_orig.w = ec->w;
    action_orig.h = ec->h;
 
+   if (action_client)
+     action_client->keyboard_resizing = 0;
    action_client = ec;
 }
 
@@ -4223,8 +4227,12 @@ e_client_act_resize_keyboard(E_Client *ec)
    if (!ec->zone) return;
 
    ec->resize_mode = E_POINTER_RESIZE_TL;
+   ec->keyboard_resizing = 1;
    if (!e_client_resize_begin(ec))
-     return;
+     {
+        ec->keyboard_resizing = 0;
+        return;
+     }
 
    _e_client_action_init(ec);
    _e_client_action_resize_timeout_add();
index 9f62e09..5ef068f 100644 (file)
@@ -696,6 +696,7 @@ struct E_Client
    Eina_Bool ignored : 1; // client is comp-ignored
    Eina_Bool no_shape_cut : 1; // client shape should not be cut
    Eina_Bool maximize_override : 1; // client is doing crazy stuff and should "just do it" when moving/resizing
+   Eina_Bool keyboard_resizing : 1;
 
 #ifdef HAVE_WAYLAND
    uuid_t uuid;