forked from enlightenment/enlightenment
fix battery module sizing and handle netwm activate messages.
SVN revision: 34950
This commit is contained in:
parent
8e6f219cef
commit
aa87227505
|
@ -259,6 +259,7 @@ e_hints_client_list_set(void)
|
|||
E_Border_List *bl;
|
||||
E_Border *b;
|
||||
Ecore_X_Window *clients = NULL;
|
||||
Ecore_X_Window *clients_focus = NULL;
|
||||
|
||||
/* Get client count by adding client lists on all containers */
|
||||
for (ml = e_manager_list(); ml; ml = ml->next)
|
||||
|
@ -281,6 +282,7 @@ e_hints_client_list_set(void)
|
|||
for (ml = e_manager_list(); ml; ml = ml->next)
|
||||
{
|
||||
m = ml->data;
|
||||
i = 0;
|
||||
for (cl = m->containers; cl; cl = cl->next)
|
||||
{
|
||||
c = cl->data;
|
||||
|
@ -289,12 +291,16 @@ e_hints_client_list_set(void)
|
|||
clients[i++] = b->client.win;
|
||||
e_container_border_list_free(bl);
|
||||
}
|
||||
}
|
||||
for (ml = e_manager_list(); ml; ml = ml->next)
|
||||
if (i > 0)
|
||||
{
|
||||
m = ml->data;
|
||||
ecore_x_netwm_client_list_set(m->root, clients, num);
|
||||
ecore_x_netwm_client_list_stacking_set(m->root, clients, num);
|
||||
ecore_x_netwm_client_list_stacking_set(m->root, clients, i);
|
||||
ecore_x_netwm_client_list_set(m->root, clients, i);
|
||||
}
|
||||
else
|
||||
{
|
||||
ecore_x_netwm_client_list_set(m->root, NULL, 0);
|
||||
ecore_x_netwm_client_list_stacking_set(m->root, NULL, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
|
@ -13,6 +13,7 @@ static int _e_manager_cb_key_down(void *data, int ev_type, void *ev);
|
|||
static int _e_manager_cb_frame_extents_request(void *data, int ev_type, void *ev);
|
||||
static int _e_manager_cb_ping(void *data, int ev_type, void *ev);
|
||||
static int _e_manager_cb_screensaver_notify(void *data, int ev_type, void *ev);
|
||||
static int _e_manager_cb_client_message(void *data, int ev_type, void *ev);
|
||||
|
||||
static Evas_Bool _e_manager_frame_extents_free_cb(const Evas_Hash *hash __UNUSED__,
|
||||
const char *key __UNUSED__,
|
||||
|
@ -142,6 +143,8 @@ e_manager_new(Ecore_X_Window root, int num)
|
|||
if (h) man->handlers = evas_list_append(man->handlers, h);
|
||||
h = ecore_event_handler_add(ECORE_X_EVENT_SCREENSAVER_NOTIFY, _e_manager_cb_screensaver_notify, man);
|
||||
if (h) man->handlers = evas_list_append(man->handlers, h);
|
||||
h = ecore_event_handler_add(ECORE_X_EVENT_CLIENT_MESSAGE, _e_manager_cb_client_message, man);
|
||||
if (h) man->handlers = evas_list_append(man->handlers, h);
|
||||
|
||||
man->pointer = e_pointer_window_new(man->root, 1);
|
||||
|
||||
|
@ -785,6 +788,51 @@ _e_manager_cb_screensaver_notify(void *data, int ev_type __UNUSED__, void *ev)
|
|||
return 1;
|
||||
}
|
||||
|
||||
static int
|
||||
_e_manager_cb_client_message(void *data, int ev_type, void *ev)
|
||||
{
|
||||
E_Manager *man;
|
||||
Ecore_X_Event_Client_Message *e;
|
||||
E_Border *bd;
|
||||
|
||||
man = data;
|
||||
e = ev;
|
||||
|
||||
if (e->message_type == ECORE_X_ATOM_NET_ACTIVE_WINDOW)
|
||||
{
|
||||
bd = e_border_find_by_client_window(e->win);
|
||||
if ((bd) && (!bd->focused))
|
||||
{
|
||||
if (bd->iconic)
|
||||
{
|
||||
if (e_config->clientlist_warp_to_iconified_desktop == 1)
|
||||
e_desk_show(bd->desk);
|
||||
|
||||
if (!bd->lock_user_iconify)
|
||||
e_border_uniconify(bd);
|
||||
}
|
||||
if (!bd->iconic) e_desk_show(bd->desk);
|
||||
if (!bd->lock_user_stacking) e_border_raise(bd);
|
||||
if (!bd->lock_focus_out)
|
||||
{
|
||||
if (e_config->focus_policy != E_FOCUS_CLICK)
|
||||
ecore_x_pointer_warp(bd->zone->container->win,
|
||||
bd->x + (bd->w / 2), bd->y + (bd->h / 2));
|
||||
e_border_focus_set(bd, 1, 1);
|
||||
}
|
||||
#if 0 /* notes */
|
||||
if (e->data.l[0] == 0 /* 0 == old, 1 == client, 2 == pager */)
|
||||
{
|
||||
}
|
||||
timestamp = e->data.l[1];
|
||||
requestor_id e->data.l[2];
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
static Evas_Bool
|
||||
_e_manager_frame_extents_free_cb(const Evas_Hash *hash __UNUSED__, const char *key __UNUSED__,
|
||||
void *data, void *fdata __UNUSED__)
|
||||
|
@ -823,5 +871,4 @@ static int _e_manager_cb_window_stack_request(void *data, int ev_type, void *ev)
|
|||
static int _e_manager_cb_window_property(void *data, int ev_type, void *ev){return 1;}
|
||||
static int _e_manager_cb_window_colormap(void *data, int ev_type, void *ev){return 1;}
|
||||
static int _e_manager_cb_window_shape(void *data, int ev_type, void *ev){return 1;}
|
||||
static int _e_manager_cb_client_message(void *data, int ev_type, void *ev){return 1;}
|
||||
#endif
|
||||
|
|
|
@ -110,16 +110,18 @@ static void
|
|||
_gc_orient(E_Gadcon_Client *gcc)
|
||||
{
|
||||
Instance *inst;
|
||||
Evas_Coord mw, mh;
|
||||
Evas_Coord mw, mh, mxw, mxh;
|
||||
|
||||
inst = gcc->data;
|
||||
mw = 0, mh = 0;
|
||||
edje_object_size_min_get(inst->o_battery, &mw, &mh);
|
||||
edje_object_size_max_get(inst->o_battery, &mxw, &mxh);
|
||||
if ((mw < 1) || (mh < 1))
|
||||
edje_object_size_min_calc(inst->o_battery, &mw, &mh);
|
||||
if (mw < 4) mw = 4;
|
||||
if (mh < 4) mh = 4;
|
||||
e_gadcon_client_aspect_set(gcc, mw, mh);
|
||||
if ((mxw > 0) && (mxh > 0))
|
||||
e_gadcon_client_aspect_set(gcc, mxw, mxh);
|
||||
e_gadcon_client_min_size_set(gcc, mw, mh);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue