Just don't tile them.
/* General settings */
of = e_widget_framelist_add(evas, _("General"), 0);
e_widget_framelist_object_append(of,
- e_widget_check_add(evas, _("Tile dialog windows as well"),
- &cfdata->config.tile_dialogs));
- e_widget_framelist_object_append(of,
e_widget_check_add(evas, _("Show window titles"),
&cfdata->config.show_titles));
+ e_widget_framelist_object_append(of,
+ e_widget_check_add(evas, _("Tile dialog windows"),
+ &cfdata->config.tile_dialogs));
oc = e_widget_list_add(evas, false, true);
e_widget_framelist_object_append(of, oc);
}
EINA_LIST_REMOVE(_G.tinfo->floating_windows, ec);
+ EINA_LIST_REMOVE(_G.tinfo->sticky_windows, ec);
_reapply_tree();
}
return true;
}
+static void
+toggle_sticky(E_Client *ec)
+{
+ if (!ec)
+ return;
+ if (!desk_should_tile_check(ec->desk))
+ return;
+
+ if (EINA_LIST_IS_IN(_G.tinfo->sticky_windows, ec)) {
+ EINA_LIST_REMOVE(_G.tinfo->sticky_windows, ec);
+
+ _add_client(ec);
+ } else {
+ _remove_client(ec);
+ _restore_client(ec);
+ EINA_LIST_APPEND(_G.tinfo->sticky_windows, ec);
+ }
+}
+
static Eina_Bool
-_stick_hook(void *data __UNUSED__, int type __UNUSED__, void *event __UNUSED__)
+_stick_hook(void *data __UNUSED__, int type __UNUSED__, E_Event_Client *event)
{
- DBG("TODO");
- return true;
+ toggle_sticky(event->ec);
+ return true;
}
static Eina_Bool
-_unstick_hook(void *data __UNUSED__, int type __UNUSED__, void *event __UNUSED__)
+_unstick_hook(void *data __UNUSED__, int type __UNUSED__, E_Event_Client *event)
{
- DBG("TODO");
- return true;
+ toggle_sticky(event->ec);
+ return true;
}
static Eina_Bool
/* List of windows which were toggled floating */
Eina_List *floating_windows;
+ /* List of sticky windows. */
+ Eina_List *sticky_windows;
Window_Tree *tree;
};