forked from enlightenment/enlightenment
Fix shading to pull window contents in the right direction again.
Add a "clients" submenu to the right click menu to show the current container's clients and all iconified clients (so you can actually un-iconify now) Add "iconify" subsystem to keep track of iconic windows. This will be used be used by modules to do things like taskbars and icon boxes. SVN revision: 12534
This commit is contained in:
parent
10e8be1a6b
commit
ffa31f9262
|
@ -35,7 +35,9 @@ e_canvas.h \
|
||||||
e_focus.h \
|
e_focus.h \
|
||||||
e_place.h \
|
e_place.h \
|
||||||
e_resist.h \
|
e_resist.h \
|
||||||
e_startup.h
|
e_startup.h \
|
||||||
|
e_iconify.h
|
||||||
|
|
||||||
|
|
||||||
enlightenment_SOURCES = \
|
enlightenment_SOURCES = \
|
||||||
e_file.c \
|
e_file.c \
|
||||||
|
@ -65,6 +67,7 @@ e_focus.c \
|
||||||
e_place.c \
|
e_place.c \
|
||||||
e_resist.c \
|
e_resist.c \
|
||||||
e_startup.c \
|
e_startup.c \
|
||||||
|
e_iconify.c \
|
||||||
$(ENLIGHTENMENTHEADERS)
|
$(ENLIGHTENMENTHEADERS)
|
||||||
|
|
||||||
enlightenment_LDFLAGS = -export-dynamic @e_libs@ @dlopen_libs@
|
enlightenment_LDFLAGS = -export-dynamic @e_libs@ @dlopen_libs@
|
||||||
|
@ -83,3 +86,4 @@ enlightenment_eapp_LDFLAGS = @e_libs@ @dlopen_libs@
|
||||||
|
|
||||||
installed_headersdir = $(prefix)/include/enlightenment
|
installed_headersdir = $(prefix)/include/enlightenment
|
||||||
installed_headers_DATA = $(ENLIGHTENMENTHEADERS)
|
installed_headers_DATA = $(ENLIGHTENMENTHEADERS)
|
||||||
|
|
||||||
|
|
|
@ -68,6 +68,7 @@
|
||||||
#include "e_place.h"
|
#include "e_place.h"
|
||||||
#include "e_resist.h"
|
#include "e_resist.h"
|
||||||
#include "e_startup.h"
|
#include "e_startup.h"
|
||||||
|
#include "e_iconify.h"
|
||||||
|
|
||||||
typedef struct _E_Before_Idler E_Before_Idler;
|
typedef struct _E_Before_Idler E_Before_Idler;
|
||||||
|
|
||||||
|
|
|
@ -250,11 +250,15 @@ e_border_hide(E_Border *bd)
|
||||||
{
|
{
|
||||||
E_OBJECT_CHECK(bd);
|
E_OBJECT_CHECK(bd);
|
||||||
if (!bd->visible) return;
|
if (!bd->visible) return;
|
||||||
|
|
||||||
ecore_x_window_hide(bd->client.win);
|
ecore_x_window_hide(bd->client.win);
|
||||||
e_container_shape_hide(bd->shape);
|
e_container_shape_hide(bd->shape);
|
||||||
/* FIXME: might be iconic too - need to do this elsewhere */
|
|
||||||
ecore_x_icccm_state_set(bd->client.win, ECORE_X_WINDOW_STATE_HINT_WITHDRAWN);
|
if (bd->iconic)
|
||||||
/* ecore_x_icccm_state_set(bd->client.win, ECORE_X_WINDOW_STATE_HINT_ICONIC); */
|
ecore_x_icccm_state_set(bd->client.win, ECORE_X_WINDOW_STATE_HINT_WITHDRAWN);
|
||||||
|
else
|
||||||
|
ecore_x_icccm_state_set(bd->client.win, ECORE_X_WINDOW_STATE_HINT_WITHDRAWN);
|
||||||
|
|
||||||
bd->visible = 0;
|
bd->visible = 0;
|
||||||
bd->changed = 1;
|
bd->changed = 1;
|
||||||
bd->changes.visible = 1;
|
bd->changes.visible = 1;
|
||||||
|
@ -571,15 +575,10 @@ e_border_iconify(E_Border *bd)
|
||||||
{
|
{
|
||||||
E_OBJECT_CHECK(bd);
|
E_OBJECT_CHECK(bd);
|
||||||
if ((bd->shading)) return;
|
if ((bd->shading)) return;
|
||||||
if (!bd->iconified)
|
if (!bd->iconic)
|
||||||
{
|
{
|
||||||
printf("ICONIFY!!\n");
|
bd->iconic = 1;
|
||||||
|
|
||||||
/* FIXME add to list of iconified windows */
|
|
||||||
e_border_hide(bd);
|
e_border_hide(bd);
|
||||||
|
|
||||||
bd->iconified = 1;
|
|
||||||
|
|
||||||
edje_object_signal_emit(bd->bg_object, "iconify", "");
|
edje_object_signal_emit(bd->bg_object, "iconify", "");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -589,19 +588,15 @@ e_border_uniconify(E_Border *bd)
|
||||||
{
|
{
|
||||||
E_OBJECT_CHECK(bd);
|
E_OBJECT_CHECK(bd);
|
||||||
if ((bd->shading)) return;
|
if ((bd->shading)) return;
|
||||||
if (bd->iconified)
|
if (bd->iconic)
|
||||||
{
|
{
|
||||||
printf("UNICONIFY!!\n");
|
bd->iconic = 0;
|
||||||
/* FIXME remove from list of iconified windows */
|
|
||||||
e_border_show(bd);
|
e_border_show(bd);
|
||||||
|
e_iconify_border_remove(bd);
|
||||||
bd->iconified = 1;
|
|
||||||
|
|
||||||
edje_object_signal_emit(bd->bg_object, "uniconify", "");
|
edje_object_signal_emit(bd->bg_object, "uniconify", "");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
E_Border *
|
E_Border *
|
||||||
e_border_find_by_client_window(Ecore_X_Window win)
|
e_border_find_by_client_window(Ecore_X_Window win)
|
||||||
{
|
{
|
||||||
|
@ -699,7 +694,8 @@ _e_border_cb_window_hide(void *data, int ev_type, void *ev)
|
||||||
{
|
{
|
||||||
E_Border *bd;
|
E_Border *bd;
|
||||||
Ecore_X_Event_Window_Hide *e;
|
Ecore_X_Event_Window_Hide *e;
|
||||||
|
|
||||||
|
printf("in hide cb\n");
|
||||||
bd = data;
|
bd = data;
|
||||||
e = ev;
|
e = ev;
|
||||||
bd = e_border_find_by_client_window(e->win);
|
bd = e_border_find_by_client_window(e->win);
|
||||||
|
@ -709,7 +705,8 @@ _e_border_cb_window_hide(void *data, int ev_type, void *ev)
|
||||||
bd->ignore_first_unmap--;
|
bd->ignore_first_unmap--;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
e_object_del(E_OBJECT(bd));
|
if (!(bd->iconic)) e_object_del(E_OBJECT(bd));
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1195,7 +1192,7 @@ _e_border_cb_signal_action(void *data, Evas_Object *obj, const char *emission, c
|
||||||
}
|
}
|
||||||
else if (!strcmp(source, "iconify"))
|
else if (!strcmp(source, "iconify"))
|
||||||
{
|
{
|
||||||
if (bd->iconified) e_border_uniconify(bd);
|
if (bd->iconic) e_border_uniconify(bd);
|
||||||
else e_border_iconify(bd);
|
else e_border_iconify(bd);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1914,14 +1911,9 @@ _e_border_eval(E_Border *bd)
|
||||||
printf("border move resize\n");
|
printf("border move resize\n");
|
||||||
if (bd->shaded && !bd->shading)
|
if (bd->shaded && !bd->shading)
|
||||||
{
|
{
|
||||||
printf("******** move resize, shaded!\n");
|
|
||||||
evas_obscured_clear(bd->bg_evas);
|
evas_obscured_clear(bd->bg_evas);
|
||||||
ecore_x_window_move_resize(bd->win, bd->x, bd->y, bd->w, bd->h);
|
ecore_x_window_move_resize(bd->win, bd->x, bd->y, bd->w, bd->h);
|
||||||
ecore_x_window_move_resize(bd->event_win, 0, 0, bd->w, bd->h);
|
ecore_x_window_move_resize(bd->event_win, 0, 0, bd->w, bd->h);
|
||||||
/* FIXME: this assumes shading upwards */
|
|
||||||
/* the client is hidden, why move it? --rephorm */
|
|
||||||
/* ecore_x_window_move_resize(bd->client.win, 0, bd->h - (bd->client_inset.t + bd->client_inset.b) - bd->client.h,
|
|
||||||
bd->client.w, bd->client.h);*/
|
|
||||||
ecore_evas_move_resize(bd->bg_ecore_evas, 0, 0, bd->w, bd->h);
|
ecore_evas_move_resize(bd->bg_ecore_evas, 0, 0, bd->w, bd->h);
|
||||||
evas_object_resize(bd->bg_object, bd->w, bd->h);
|
evas_object_resize(bd->bg_object, bd->w, bd->h);
|
||||||
e_container_shape_resize(bd->shape, bd->w, bd->h);
|
e_container_shape_resize(bd->shape, bd->w, bd->h);
|
||||||
|
@ -1940,8 +1932,25 @@ _e_border_eval(E_Border *bd)
|
||||||
bd->client_inset.l, bd->client_inset.t,
|
bd->client_inset.l, bd->client_inset.t,
|
||||||
bd->w - (bd->client_inset.l + bd->client_inset.r),
|
bd->w - (bd->client_inset.l + bd->client_inset.r),
|
||||||
bd->h - (bd->client_inset.t + bd->client_inset.b));
|
bd->h - (bd->client_inset.t + bd->client_inset.b));
|
||||||
ecore_x_window_move_resize(bd->client.win, 0, 0,
|
if (bd->shading)
|
||||||
bd->client.w, bd->client.h);
|
{
|
||||||
|
if (bd->shade.dir == E_DIRECTION_UP)
|
||||||
|
ecore_x_window_move_resize(bd->client.win, 0,
|
||||||
|
bd->h - (bd->client_inset.t + bd->client_inset.b) -
|
||||||
|
bd->client.h,
|
||||||
|
bd->client.w, bd->client.h);
|
||||||
|
else if (bd->shade.dir == E_DIRECTION_LEFT)
|
||||||
|
ecore_x_window_move_resize(bd->client.win,
|
||||||
|
bd->w - (bd->client_inset.l + bd->client_inset.r) -
|
||||||
|
bd->client.h,
|
||||||
|
0, bd->client.w, bd->client.h);
|
||||||
|
else
|
||||||
|
ecore_x_window_move_resize(bd->client.win, 0, 0,
|
||||||
|
bd->client.w, bd->client.h);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
ecore_x_window_move_resize(bd->client.win, 0, 0,
|
||||||
|
bd->client.w, bd->client.h);
|
||||||
ecore_evas_move_resize(bd->bg_ecore_evas, 0, 0, bd->w, bd->h);
|
ecore_evas_move_resize(bd->bg_ecore_evas, 0, 0, bd->w, bd->h);
|
||||||
evas_object_resize(bd->bg_object, bd->w, bd->h);
|
evas_object_resize(bd->bg_object, bd->w, bd->h);
|
||||||
e_container_shape_resize(bd->shape, bd->w, bd->h);
|
e_container_shape_resize(bd->shape, bd->w, bd->h);
|
||||||
|
@ -1962,14 +1971,9 @@ _e_border_eval(E_Border *bd)
|
||||||
printf("border move resize\n");
|
printf("border move resize\n");
|
||||||
if (bd->shaded && !bd->shading)
|
if (bd->shaded && !bd->shading)
|
||||||
{
|
{
|
||||||
printf("******** resize, shaded!\n");
|
|
||||||
evas_obscured_clear(bd->bg_evas);
|
evas_obscured_clear(bd->bg_evas);
|
||||||
ecore_x_window_move_resize(bd->event_win, 0, 0, bd->w, bd->h);
|
ecore_x_window_move_resize(bd->event_win, 0, 0, bd->w, bd->h);
|
||||||
ecore_x_window_resize(bd->win, bd->w, bd->h);
|
ecore_x_window_resize(bd->win, bd->w, bd->h);
|
||||||
/* FIXME: this assumes shading upwards */
|
|
||||||
/* the client is hidden, why move it? --rephorm */
|
|
||||||
/* ecore_x_window_move_resize(bd->client.win, 0, bd->h - (bd->client_inset.t + bd->client_inset.b) - bd->client.h,
|
|
||||||
bd->client.w, bd->client.h);*/
|
|
||||||
ecore_evas_move_resize(bd->bg_ecore_evas, 0, 0, bd->w, bd->h);
|
ecore_evas_move_resize(bd->bg_ecore_evas, 0, 0, bd->w, bd->h);
|
||||||
evas_object_resize(bd->bg_object, bd->w, bd->h);
|
evas_object_resize(bd->bg_object, bd->w, bd->h);
|
||||||
e_container_shape_resize(bd->shape, bd->w, bd->h);
|
e_container_shape_resize(bd->shape, bd->w, bd->h);
|
||||||
|
@ -1986,8 +1990,25 @@ _e_border_eval(E_Border *bd)
|
||||||
bd->client_inset.l, bd->client_inset.t,
|
bd->client_inset.l, bd->client_inset.t,
|
||||||
bd->w - (bd->client_inset.l + bd->client_inset.r),
|
bd->w - (bd->client_inset.l + bd->client_inset.r),
|
||||||
bd->h - (bd->client_inset.t + bd->client_inset.b));
|
bd->h - (bd->client_inset.t + bd->client_inset.b));
|
||||||
ecore_x_window_move_resize(bd->client.win, 0, 0,
|
if (bd->shading)
|
||||||
bd->client.w, bd->client.h);
|
{
|
||||||
|
if (bd->shade.dir == E_DIRECTION_UP)
|
||||||
|
ecore_x_window_move_resize(bd->client.win, 0,
|
||||||
|
bd->h - (bd->client_inset.t + bd->client_inset.b) -
|
||||||
|
bd->client.h,
|
||||||
|
bd->client.w, bd->client.h);
|
||||||
|
else if (bd->shade.dir == E_DIRECTION_LEFT)
|
||||||
|
ecore_x_window_move_resize(bd->client.win,
|
||||||
|
bd->w - (bd->client_inset.l + bd->client_inset.r) -
|
||||||
|
bd->client.h,
|
||||||
|
0, bd->client.w, bd->client.h);
|
||||||
|
else
|
||||||
|
ecore_x_window_move_resize(bd->client.win, 0, 0,
|
||||||
|
bd->client.w, bd->client.h);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
ecore_x_window_move_resize(bd->client.win, 0, 0,
|
||||||
|
bd->client.w, bd->client.h);
|
||||||
ecore_evas_move_resize(bd->bg_ecore_evas, 0, 0, bd->w, bd->h);
|
ecore_evas_move_resize(bd->bg_ecore_evas, 0, 0, bd->w, bd->h);
|
||||||
evas_object_resize(bd->bg_object, bd->w, bd->h);
|
evas_object_resize(bd->bg_object, bd->w, bd->h);
|
||||||
e_container_shape_resize(bd->shape, bd->w, bd->h);
|
e_container_shape_resize(bd->shape, bd->w, bd->h);
|
||||||
|
|
|
@ -135,7 +135,7 @@ struct _E_Border
|
||||||
unsigned char shading : 1;
|
unsigned char shading : 1;
|
||||||
unsigned char shaded : 1;
|
unsigned char shaded : 1;
|
||||||
unsigned char maximized : 1;
|
unsigned char maximized : 1;
|
||||||
unsigned char iconified : 1;
|
unsigned char iconic : 1;
|
||||||
|
|
||||||
unsigned char changed : 1;
|
unsigned char changed : 1;
|
||||||
|
|
||||||
|
@ -195,4 +195,6 @@ EAPI E_Border *e_border_find_by_client_window(Ecore_X_Window win);
|
||||||
|
|
||||||
EAPI void e_border_idler_before(void);
|
EAPI void e_border_idler_before(void);
|
||||||
|
|
||||||
|
EAPI void e_border_iconified_list(void);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -178,6 +178,13 @@ e_container_bg_reconfigure(E_Container *con)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Evas_List *
|
||||||
|
e_container_clients_list_get(E_Container *con)
|
||||||
|
{
|
||||||
|
E_OBJECT_CHECK(con);
|
||||||
|
return con->clients;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
E_Container_Shape *
|
E_Container_Shape *
|
||||||
e_container_shape_add(E_Container *con)
|
e_container_shape_add(E_Container *con)
|
||||||
|
|
|
@ -66,6 +66,8 @@ EAPI void e_container_raise(E_Container *con);
|
||||||
EAPI void e_container_lower(E_Container *con);
|
EAPI void e_container_lower(E_Container *con);
|
||||||
EAPI void e_container_bg_reconfigure(E_Container *con);
|
EAPI void e_container_bg_reconfigure(E_Container *con);
|
||||||
|
|
||||||
|
EAPI Evas_List *e_container_clients_list_get(E_Container *con);
|
||||||
|
|
||||||
EAPI E_Container_Shape *e_container_shape_add(E_Container *con);
|
EAPI E_Container_Shape *e_container_shape_add(E_Container *con);
|
||||||
EAPI void e_container_shape_show(E_Container_Shape *es);
|
EAPI void e_container_shape_show(E_Container_Shape *es);
|
||||||
EAPI void e_container_shape_hide(E_Container_Shape *es);
|
EAPI void e_container_shape_hide(E_Container_Shape *es);
|
||||||
|
|
|
@ -0,0 +1,55 @@
|
||||||
|
/*
|
||||||
|
* vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "e.h"
|
||||||
|
|
||||||
|
static Evas_List *_e_iconic_borders = NULL;
|
||||||
|
|
||||||
|
int
|
||||||
|
e_iconify_init(void)
|
||||||
|
{
|
||||||
|
/* FIXME: initialize some ecore events for iconify/uniconify
|
||||||
|
* (for things like modules to upate state
|
||||||
|
*/
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
e_iconify_shutdown(void)
|
||||||
|
{
|
||||||
|
evas_list_free(_e_iconic_borders);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
Evas_List *
|
||||||
|
e_iconify_clients_list_get(void)
|
||||||
|
{
|
||||||
|
return _e_iconic_borders;
|
||||||
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
e_iconify_border_iconfied(E_Border *bd)
|
||||||
|
{
|
||||||
|
if (evas_list_find(_e_iconic_borders, bd)) return 1;
|
||||||
|
else return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
e_iconify_border_add(E_Border *bd)
|
||||||
|
{
|
||||||
|
E_OBJECT_CHECK(bd);
|
||||||
|
|
||||||
|
/* FIXME send iconify event for this border */
|
||||||
|
_e_iconic_borders = evas_list_append(_e_iconic_borders, bd);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
e_iconify_border_remove(E_Border *bd)
|
||||||
|
{
|
||||||
|
/* FIXME send uniconify event for this border */
|
||||||
|
_e_iconic_borders = evas_list_remove(_e_iconic_borders, bd);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,10 @@
|
||||||
|
#ifndef E_ICONIFY_H
|
||||||
|
#define E_ICONIFY_H
|
||||||
|
|
||||||
|
EAPI int e_iconify_init(void);
|
||||||
|
EAPI int e_iconify_shutdown(void);
|
||||||
|
|
||||||
|
EAPI Evas_List *e_iconify_clients_list_get(void);
|
||||||
|
EAPI int e_iconify_border_iconfied(E_Border *bd);
|
||||||
|
|
||||||
|
#endif
|
|
@ -1,3 +1,6 @@
|
||||||
|
/*
|
||||||
|
* vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
|
||||||
|
*/
|
||||||
#include "e.h"
|
#include "e.h"
|
||||||
|
|
||||||
typedef struct _About_Data About_Data;
|
typedef struct _About_Data About_Data;
|
||||||
|
@ -18,6 +21,8 @@ static void _e_int_menus_apps_start (void *data, E_Menu *m);
|
||||||
static void _e_int_menus_apps_end (void *data, E_Menu *m);
|
static void _e_int_menus_apps_end (void *data, E_Menu *m);
|
||||||
static void _e_int_menus_apps_free_hook(void *obj);
|
static void _e_int_menus_apps_free_hook(void *obj);
|
||||||
static void _e_int_menus_apps_run (void *data, E_Menu *m, E_Menu_Item *mi);
|
static void _e_int_menus_apps_run (void *data, E_Menu *m, E_Menu_Item *mi);
|
||||||
|
static void _e_int_menus_clients_pre_cb(void *data, E_Menu *m);
|
||||||
|
static void _e_int_menus_clients_item_cb (void *data, E_Menu *m, E_Menu_Item *mi);
|
||||||
|
|
||||||
/* externally accessible functions */
|
/* externally accessible functions */
|
||||||
E_Menu *
|
E_Menu *
|
||||||
|
@ -43,7 +48,13 @@ e_int_menus_about_new(void)
|
||||||
mi = e_menu_item_new(m);
|
mi = e_menu_item_new(m);
|
||||||
e_menu_item_label_set(mi, "Modules");
|
e_menu_item_label_set(mi, "Modules");
|
||||||
e_menu_item_submenu_set(mi, subm);
|
e_menu_item_submenu_set(mi, subm);
|
||||||
|
|
||||||
|
subm = e_menu_new();
|
||||||
|
e_menu_pre_activate_callback_set(subm, _e_int_menus_clients_pre_cb, NULL);
|
||||||
|
mi = e_menu_item_new(m);
|
||||||
|
e_menu_item_label_set(mi, "Clients");
|
||||||
|
e_menu_item_submenu_set(mi, subm);
|
||||||
|
|
||||||
mi = e_menu_item_new(m);
|
mi = e_menu_item_new(m);
|
||||||
e_menu_item_separator_set(mi, 1);
|
e_menu_item_separator_set(mi, 1);
|
||||||
|
|
||||||
|
@ -76,6 +87,16 @@ e_int_menus_apps_new(char *dir, int top)
|
||||||
return m;
|
return m;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
E_Menu *
|
||||||
|
e_int_menus_clients_new(char *dir, int top)
|
||||||
|
{
|
||||||
|
E_Menu *m;
|
||||||
|
E_Menu_Item *mi;
|
||||||
|
|
||||||
|
m = e_menu_new();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
/* local subsystem functions */
|
/* local subsystem functions */
|
||||||
static void
|
static void
|
||||||
_e_int_menus_about_end(void *data, E_Menu *m)
|
_e_int_menus_about_end(void *data, E_Menu *m)
|
||||||
|
@ -187,3 +208,71 @@ _e_int_menus_apps_run(void *data, E_Menu *m, E_Menu_Item *mi)
|
||||||
a = data;
|
a = data;
|
||||||
e_app_exec(a);
|
e_app_exec(a);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
_e_int_menus_clients_pre_cb(void *data, E_Menu *m)
|
||||||
|
{
|
||||||
|
E_Menu_Item *mi;
|
||||||
|
Evas_List *l, *borders = NULL;
|
||||||
|
|
||||||
|
if (m->realized) return;
|
||||||
|
|
||||||
|
/* clear the list */
|
||||||
|
if (m->items)
|
||||||
|
{
|
||||||
|
Evas_List *l;
|
||||||
|
for (l = m->items; l; l = l->next)
|
||||||
|
{
|
||||||
|
E_Menu_Item *mi = l->data;
|
||||||
|
e_object_free(E_OBJECT(mi));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/* get the current containers clients */
|
||||||
|
if (m->parent_item && m->parent_item->menu && m->parent_item->menu->con)
|
||||||
|
{
|
||||||
|
for (l = e_container_clients_list_get(m->parent_item->menu->con); l; l = l->next)
|
||||||
|
{
|
||||||
|
borders = evas_list_append(borders, l->data);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* get the iconified clients from other containers */
|
||||||
|
for (l = e_iconify_clients_list_get(); l; l = l->next)
|
||||||
|
{
|
||||||
|
if (!evas_list_find(borders, l->data))
|
||||||
|
borders = evas_list_append(borders, l->data);
|
||||||
|
}
|
||||||
|
|
||||||
|
for (l = borders; l; l = l->next)
|
||||||
|
{
|
||||||
|
E_Border *bd = l->data;
|
||||||
|
E_App *a;
|
||||||
|
|
||||||
|
mi = e_menu_item_new(m);
|
||||||
|
e_menu_item_check_set(mi, 1);
|
||||||
|
e_menu_item_label_set(mi, bd->client.icccm.title);
|
||||||
|
e_menu_item_callback_set(mi, _e_int_menus_clients_item_cb, bd);
|
||||||
|
if (!bd->iconic) e_menu_item_toggle_set(mi, 1);
|
||||||
|
|
||||||
|
a = e_app_window_name_class_find(bd->client.icccm.name,
|
||||||
|
bd->client.icccm.class);
|
||||||
|
if (a)
|
||||||
|
{
|
||||||
|
e_menu_item_icon_edje_set(mi, a->path, "icon");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
evas_list_free(borders);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
_e_int_menus_clients_item_cb (void *data, E_Menu *m, E_Menu_Item *mi)
|
||||||
|
{
|
||||||
|
E_Border *bd = data;
|
||||||
|
|
||||||
|
if (bd->iconic) e_border_uniconify(bd);
|
||||||
|
|
||||||
|
e_border_raise(bd);
|
||||||
|
e_border_focus_set(bd, 1, 1);
|
||||||
|
}
|
||||||
|
|
|
@ -1,3 +1,6 @@
|
||||||
|
/*
|
||||||
|
* vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
|
||||||
|
*/
|
||||||
#include "e.h"
|
#include "e.h"
|
||||||
|
|
||||||
struct _E_Before_Idler
|
struct _E_Before_Idler
|
||||||
|
@ -243,6 +246,14 @@ main(int argc, char **argv)
|
||||||
/* setup module loading etc. FIXME: check return value */
|
/* setup module loading etc. FIXME: check return value */
|
||||||
e_module_init();
|
e_module_init();
|
||||||
|
|
||||||
|
if (!e_iconify_init())
|
||||||
|
{
|
||||||
|
e_error_message_show("Enlightenment cannot setup its iconify system.");
|
||||||
|
_e_main_shutdown(-1);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
_e_main_shutdown_push(e_iconify_shutdown);
|
||||||
|
|
||||||
if (!nowelcome)
|
if (!nowelcome)
|
||||||
{
|
{
|
||||||
/* explicitly show a gui dialog */
|
/* explicitly show a gui dialog */
|
||||||
|
|
Loading…
Reference in New Issue