tooltip windows now set shape input rect in elm_win
authorMike Blumenkrantz <zmike@osg.samsung.com>
Mon, 8 Dec 2014 00:36:19 +0000 (19:36 -0500)
committerMike Blumenkrantz <zmike@osg.samsung.com>
Mon, 8 Dec 2014 01:22:30 +0000 (20:22 -0500)
this fixes a longstanding race condition where tooltip windowss could exist with a shape rectangle due to race conditions between applying window properties (eg. alpha) and reapplying the input rect

src/lib/elm_win.c
src/lib/els_tooltip.c

index 8defbc3..6d19710 100644 (file)
@@ -1749,6 +1749,10 @@ _elm_win_obj_intercept_show(void *data,
         evas_object_show(sd->pointer.obj);
      }
    evas_object_show(obj);
+#ifdef ELEMENTARY_X
+   if (sd->type == ELM_WIN_TOOLTIP)
+     ecore_x_window_shape_input_rectangle_set(sd->x.xwin, 0, 0, 0, 0);
+#endif
 }
 
 EOLIAN static void
@@ -2016,6 +2020,7 @@ _elm_win_xwin_update(Elm_Win_Data *sd)
 
       case ELM_WIN_TOOLTIP:
         ecore_x_netwm_window_type_set(sd->x.xwin, ECORE_X_WINDOW_TYPE_TOOLTIP);
+        ecore_x_window_shape_input_rectangle_set(sd->x.xwin, 0, 0, 0, 0);
         break;
 
       case ELM_WIN_NOTIFICATION:
index 46933a5..dbcac34 100644 (file)
@@ -325,12 +325,6 @@ _elm_tooltip_reconfigure(Elm_Tooltip *tt)
                   evas_object_hide(tt->tt_win);
                   elm_win_alpha_set(tt->tt_win, EINA_FALSE);
                }
-#ifdef HAVE_ELEMENTARY_X
-             Ecore_X_Window win;
-             win = elm_win_xwindow_get(tt->tt_win);
-             if (win)
-               ecore_x_window_shape_input_rectangle_set(win, 0, 0, 0, 0);
-#endif
           }
 
         str = edje_object_data_get(tt->tooltip, "pad_x");