Remove code which handles quickpanel state in client message handler.
Remove quickpanel functions from policy (handled differently now) Create quickpanel object so we can animate it. Add quickpanel init/shutdown to startup. Don't handle layer set for quickpanel in border_add Set quickpanel layer in layout code. SVN revision: 44753
This commit is contained in:
parent
c7a233c60e
commit
676817424c
|
@ -31,6 +31,8 @@ module_la_SOURCES = e_mod_main.h \
|
||||||
e_kbd.c \
|
e_kbd.c \
|
||||||
e_kbd_dbus.h \
|
e_kbd_dbus.h \
|
||||||
e_kbd_dbus.c \
|
e_kbd_dbus.c \
|
||||||
|
e_quickpanel.h \
|
||||||
|
e_quickpanel.c \
|
||||||
e_mod_config.h \
|
e_mod_config.h \
|
||||||
e_mod_config.c \
|
e_mod_config.c \
|
||||||
e_mod_animation.h \
|
e_mod_animation.h \
|
||||||
|
|
|
@ -401,21 +401,5 @@ _cb_event_client_message(void *data, int type, void *event)
|
||||||
if ((mode) && (mode->funcs.drag_end))
|
if ((mode) && (mode->funcs.drag_end))
|
||||||
mode->funcs.drag_end(bd);
|
mode->funcs.drag_end(bd);
|
||||||
}
|
}
|
||||||
else if (ev->message_type == ECORE_X_ATOM_E_ILLUME_QUICKPANEL_STATE)
|
|
||||||
{
|
|
||||||
E_Zone *zone;
|
|
||||||
|
|
||||||
zone = e_zone_current_get(e_container_current_get(e_manager_current_get()));
|
|
||||||
if (ev->data.l[0] == ECORE_X_ATOM_E_ILLUME_QUICKPANEL_OFF)
|
|
||||||
{
|
|
||||||
if ((mode) && (mode->funcs.quickpanel_off))
|
|
||||||
mode->funcs.quickpanel_off(zone);
|
|
||||||
}
|
|
||||||
else if (ev->data.l[0] == ECORE_X_ATOM_E_ILLUME_QUICKPANEL_ON)
|
|
||||||
{
|
|
||||||
if ((mode) && (mode->funcs.quickpanel_on))
|
|
||||||
mode->funcs.quickpanel_on(zone);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,8 +20,6 @@ struct _Illume_Layout_Mode
|
||||||
void (*border_activate) (E_Border *bd);
|
void (*border_activate) (E_Border *bd);
|
||||||
void (*drag_start) (E_Border *bd);
|
void (*drag_start) (E_Border *bd);
|
||||||
void (*drag_end) (E_Border *bd);
|
void (*drag_end) (E_Border *bd);
|
||||||
void (*quickpanel_on) (E_Zone *zone);
|
|
||||||
void (*quickpanel_off) (E_Zone *zone);
|
|
||||||
} funcs;
|
} funcs;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
#define IL_DIALOG_LAYER 120
|
#define IL_DIALOG_LAYER 120
|
||||||
#define IL_CONFORM_LAYER 140
|
#define IL_CONFORM_LAYER 140
|
||||||
#define IL_FULLSCREEN_LAYER 140
|
#define IL_FULLSCREEN_LAYER 140
|
||||||
#define IL_QUICK_PANEL_LAYER 160
|
#define IL_QUICKPANEL_LAYER 160
|
||||||
#define IL_APP_LAYER 100
|
#define IL_APP_LAYER 100
|
||||||
|
|
||||||
/* local function prototypes */
|
/* local function prototypes */
|
||||||
|
@ -26,8 +26,6 @@ static void _border_focus_out(E_Border *bd);
|
||||||
static void _border_activate(E_Border *bd);
|
static void _border_activate(E_Border *bd);
|
||||||
static void _drag_start(E_Border *bd);
|
static void _drag_start(E_Border *bd);
|
||||||
static void _drag_end(E_Border *bd);
|
static void _drag_end(E_Border *bd);
|
||||||
static void _quickpanel_on(E_Zone *zone);
|
|
||||||
static void _quickpanel_off(E_Zone *zone);
|
|
||||||
static void _zone_layout(E_Zone *z);
|
static void _zone_layout(E_Zone *z);
|
||||||
static void _zone_layout_single(E_Border *bd);
|
static void _zone_layout_single(E_Border *bd);
|
||||||
static void _zone_layout_dual(E_Border *bd);
|
static void _zone_layout_dual(E_Border *bd);
|
||||||
|
@ -50,8 +48,7 @@ const Illume_Layout_Mode laymode =
|
||||||
_border_focus_in, _border_focus_out,
|
_border_focus_in, _border_focus_out,
|
||||||
_zone_layout, _zone_move_resize,
|
_zone_layout, _zone_move_resize,
|
||||||
_border_activate,
|
_border_activate,
|
||||||
_drag_start, _drag_end,
|
_drag_start, _drag_end
|
||||||
_quickpanel_on, _quickpanel_off
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/* public functions */
|
/* public functions */
|
||||||
|
@ -136,25 +133,11 @@ _border_add(E_Border *bd)
|
||||||
if (b) e_border_fx_offset(b, 0, -shelfsize);
|
if (b) e_border_fx_offset(b, 0, -shelfsize);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (conform)
|
else if (conform)
|
||||||
{
|
{
|
||||||
if (bd->layer != IL_CONFORM_LAYER)
|
if (bd->layer != IL_CONFORM_LAYER)
|
||||||
e_border_layer_set(bd, IL_CONFORM_LAYER);
|
e_border_layer_set(bd, IL_CONFORM_LAYER);
|
||||||
}
|
|
||||||
|
|
||||||
/* we lock stacking so that the keyboard does not get put
|
|
||||||
* under the window (if it's needed) */
|
|
||||||
if (conform) bd->lock_user_stacking = 1;
|
|
||||||
|
|
||||||
/* handle setting quickpanel layer and lowering.
|
|
||||||
* This is handled here due to the delay with e_border_lower.
|
|
||||||
* If we try to handle this in zone_layout then things bog down a lot */
|
|
||||||
if (e_mod_border_is_quickpanel(bd))
|
|
||||||
{
|
|
||||||
if (bd->layer != IL_QUICK_PANEL_LAYER)
|
|
||||||
e_border_layer_set(bd, IL_QUICK_PANEL_LAYER);
|
|
||||||
bd->lock_user_stacking = 1;
|
bd->lock_user_stacking = 1;
|
||||||
e_border_lower(bd);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* only set focus if border accepts it and it's not locked out */
|
/* only set focus if border accepts it and it's not locked out */
|
||||||
|
@ -244,48 +227,6 @@ _drag_end(E_Border *bd)
|
||||||
ecore_x_e_illume_drag_set(bd->client.win, 0);
|
ecore_x_e_illume_drag_set(bd->client.win, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
|
||||||
_quickpanel_on(E_Zone *zone)
|
|
||||||
{
|
|
||||||
Eina_List *qps, *l;
|
|
||||||
E_Border *bd;
|
|
||||||
int th, ty, ny = 0;
|
|
||||||
|
|
||||||
printf("Illume quickpanel on\n");
|
|
||||||
if (!(qps = e_mod_border_quickpanel_borders_get(zone))) return;
|
|
||||||
e_mod_border_top_shelf_pos_get(zone, NULL, &ty);
|
|
||||||
e_mod_border_top_shelf_size_get(zone, NULL, &th);
|
|
||||||
ny = (ty + th);
|
|
||||||
EINA_LIST_FOREACH(qps, l, bd)
|
|
||||||
{
|
|
||||||
int mh;
|
|
||||||
|
|
||||||
e_mod_border_min_get(bd, NULL, &mh);
|
|
||||||
// if ((bd->w != zone->w) || (bd->h != mh))
|
|
||||||
// e_border_resize(bd, zone->w, mh);
|
|
||||||
if ((bd->x != zone->x) || (bd->y != ny) || (bd->fx.y != ny))
|
|
||||||
e_border_fx_offset(bd, 0, ny);
|
|
||||||
ny += mh;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
_quickpanel_off(E_Zone *zone)
|
|
||||||
{
|
|
||||||
Eina_List *qps, *l;
|
|
||||||
E_Border *bd;
|
|
||||||
int ty;
|
|
||||||
|
|
||||||
printf("Illume quickpanel off\n");
|
|
||||||
if (!(qps = e_mod_border_quickpanel_borders_get(zone))) return;
|
|
||||||
e_mod_border_top_shelf_pos_get(zone, NULL, &ty);
|
|
||||||
EINA_LIST_FOREACH(qps, l, bd)
|
|
||||||
{
|
|
||||||
if ((bd->x != zone->x) || (bd->y != ty) || (bd->fx.y != ty))
|
|
||||||
e_border_fx_offset(bd, 0, ty);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_zone_layout(E_Zone *z)
|
_zone_layout(E_Zone *z)
|
||||||
{
|
{
|
||||||
|
@ -388,6 +329,8 @@ _zone_layout(E_Zone *z)
|
||||||
e_mod_border_min_get(bd, NULL, &mh);
|
e_mod_border_min_get(bd, NULL, &mh);
|
||||||
if ((bd->w != bd->zone->w) || (bd->h != mh))
|
if ((bd->w != bd->zone->w) || (bd->h != mh))
|
||||||
e_border_resize(bd, bd->zone->w, mh);
|
e_border_resize(bd, bd->zone->w, mh);
|
||||||
|
if (bd->layer != IL_QUICKPANEL_LAYER)
|
||||||
|
e_border_layer_set(bd, IL_QUICKPANEL_LAYER);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -3,9 +3,11 @@
|
||||||
#include "e_mod_config.h"
|
#include "e_mod_config.h"
|
||||||
#include "e_mod_layout.h"
|
#include "e_mod_layout.h"
|
||||||
#include "e_kbd.h"
|
#include "e_kbd.h"
|
||||||
|
#include "e_quickpanel.h"
|
||||||
|
|
||||||
/* local variables */
|
/* local variables */
|
||||||
static E_Kbd *kbd = NULL;
|
static E_Kbd *kbd = NULL;
|
||||||
|
static E_Quickpanel *qp = NULL;
|
||||||
|
|
||||||
/* this is needed to advertise a label for the module IN the code (not just
|
/* this is needed to advertise a label for the module IN the code (not just
|
||||||
* the .desktop file) but more specifically the api version it was compiled
|
* the .desktop file) but more specifically the api version it was compiled
|
||||||
|
@ -23,12 +25,17 @@ e_modapi_init(E_Module *m)
|
||||||
/* set up the virtual keyboard */
|
/* set up the virtual keyboard */
|
||||||
e_kbd_init();
|
e_kbd_init();
|
||||||
|
|
||||||
|
/* init the quickpanel subsystem */
|
||||||
|
e_quickpanel_init();
|
||||||
|
|
||||||
/* init the layout subsystem */
|
/* init the layout subsystem */
|
||||||
e_mod_layout_init();
|
e_mod_layout_init();
|
||||||
|
|
||||||
/* create a new keyboard */
|
/* create a new keyboard */
|
||||||
kbd = e_kbd_new();
|
kbd = e_kbd_new();
|
||||||
|
|
||||||
|
qp = e_quickpanel_new(e_zone_current_get(e_container_current_get(e_manager_current_get())));
|
||||||
|
|
||||||
/* return NULL on failure, anything else on success. the pointer
|
/* return NULL on failure, anything else on success. the pointer
|
||||||
* returned will be set as m->data for convenience tracking */
|
* returned will be set as m->data for convenience tracking */
|
||||||
return m;
|
return m;
|
||||||
|
@ -38,6 +45,10 @@ e_modapi_init(E_Module *m)
|
||||||
EAPI int
|
EAPI int
|
||||||
e_modapi_shutdown(E_Module *m)
|
e_modapi_shutdown(E_Module *m)
|
||||||
{
|
{
|
||||||
|
/* cleanup the quickpanel */
|
||||||
|
e_object_del(E_OBJECT(qp));
|
||||||
|
qp = NULL;
|
||||||
|
|
||||||
/* cleanup the keyboard */
|
/* cleanup the keyboard */
|
||||||
e_object_del(E_OBJECT(kbd));
|
e_object_del(E_OBJECT(kbd));
|
||||||
kbd = NULL;
|
kbd = NULL;
|
||||||
|
@ -45,6 +56,9 @@ e_modapi_shutdown(E_Module *m)
|
||||||
/* run any layout shutdown code */
|
/* run any layout shutdown code */
|
||||||
e_mod_layout_shutdown();
|
e_mod_layout_shutdown();
|
||||||
|
|
||||||
|
/* shutdown the quickpanel subsystem */
|
||||||
|
e_quickpanel_shutdown();
|
||||||
|
|
||||||
/* shutdown the kbd subsystem */
|
/* shutdown the kbd subsystem */
|
||||||
e_kbd_shutdown();
|
e_kbd_shutdown();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue