return 0;
}
-void disable_focus_for_app_window (Evas_Object *win)
+void set_focus_for_app_window(Evas_Object *win, Eina_Bool enable)
{
Eina_Bool accepts_focus;
Ecore_X_Window_State_Hint initial_state;
ecore_x_icccm_hints_get (elm_win_xwindow_get (win),
&accepts_focus, &initial_state, &icon_pixmap, &icon_mask, &icon_window, &window_group, &is_urgent);
ecore_x_icccm_hints_set (elm_win_xwindow_get (win),
- 0, initial_state, icon_pixmap, icon_mask, icon_window, window_group, is_urgent);
+ enable, initial_state, icon_pixmap, icon_mask, icon_window, window_group, is_urgent);
+ DTRACE("set focus mode = %d\n", enable);
}
static Evas_Object* create_win(void *data, const char *name)
{ //disable window effect
utilx_set_window_effect_state(dpy, elm_win_xwindow_get(eo), 0);
ecore_x_icccm_name_class_set(elm_win_xwindow_get(eo), "NORMAL_WINDOW", "NORMAL_WINDOW");
+ elm_object_focus_allow_set(eo, EINA_FALSE);
// elm_win_keyboard_win_set (eo, EINA_TRUE);
// ecore_x_icccm_name_class_set(elm_win_xwindow_get(eo), "Virtual Keyboard", "ISF");
-// disable_focus_for_app_window(eo);
+ set_focus_for_app_window(eo, EINA_FALSE);
}
}
unset_transient_for(ad);
}
ad->anim_status = STATUS_NONE;
+ set_focus_for_app_window(ad->win_main, EINA_FALSE);
return EINA_FALSE;
}
void clipdrawer_activate_view(void *data)
{
struct appdata *ad = data;
-
+
+ set_focus_for_app_window(ad->win_main, EINA_TRUE);
if (ad->win_main)
{
set_transient_for(ad);
evas_object_show(ad->win_main);
- clipdrawer_anim_effect(ad, SHOW_ANIM);
elm_win_activate(ad->win_main);
+// elm_win_raise(ad->win_main);
+ clipdrawer_anim_effect(ad, SHOW_ANIM);
ad->windowshow = EINA_TRUE;
}
}
struct appdata *ad = data;
Ecore_X_Window xwin_active = None;
- Atom atomActive = XInternAtom(g_disp, "_NET_ACTIVE_WINDOW", False);
+// Atom atomActive = XInternAtom(g_disp, "_NET_ACTIVE_WINDOW", False);
+ Atom atomActive = XInternAtom(g_disp, "_ISF_ACTIVE_WINDOW", False);
if (ecore_x_window_prop_window_get(DefaultRootWindow(g_disp),
atomActive, &xwin_active, 1) != -1)