2010-02-18 19:00:58 -08:00
|
|
|
#include "e.h"
|
|
|
|
#include "e_mod_main.h"
|
2010-04-02 10:24:02 -07:00
|
|
|
#include "e_mod_config.h"
|
2010-02-18 19:00:58 -08:00
|
|
|
#include "e_mod_sft_win.h"
|
|
|
|
|
|
|
|
/* local function prototypes */
|
|
|
|
static void _e_mod_sft_win_cb_free(Sft_Win *swin);
|
2010-06-24 09:19:12 -07:00
|
|
|
static Eina_Bool _e_mod_sft_win_cb_win_prop(void *data, int type __UNUSED__, void *event);
|
|
|
|
static Eina_Bool _e_mod_sft_win_cb_zone_resize(void *data, int type __UNUSED__, void *event);
|
2010-02-18 19:00:58 -08:00
|
|
|
static void _e_mod_sft_win_cb_resize(E_Win *win);
|
|
|
|
static void _e_mod_sft_win_create_default_buttons(Sft_Win *swin);
|
2011-01-29 13:08:13 -08:00
|
|
|
static void _e_mod_sft_win_create_extra_buttons(Sft_Win *swin);
|
2010-02-18 19:00:58 -08:00
|
|
|
static void _e_mod_sft_win_cb_close(void *data, void *data2 __UNUSED__);
|
|
|
|
static void _e_mod_sft_win_cb_back(void *data, void *data2 __UNUSED__);
|
2010-10-05 12:15:39 -07:00
|
|
|
static void _e_mod_sft_win_cb_forward(void *data, void *data2 __UNUSED__);
|
2011-01-29 13:08:13 -08:00
|
|
|
static void _e_mod_sft_win_cb_win_pos(void *data, void *data2 __UNUSED__);
|
|
|
|
static void _e_mod_sft_win_pos_toggle_top(Sft_Win *swin);
|
|
|
|
static void _e_mod_sft_win_pos_toggle_left(Sft_Win *swin);
|
compositor rewrite / charlie-foxtrot situation
huge fustercluck commit because there wasn't really a way to separate out the changes. better to just rip it all out at once.
* compositor and window management completely rewritten. this was the goal for E19, but it pretty much required everything existing to be scrapped since it wasn't optimized, streamlined, or sensible. now instead of having the compositor strapped to the window manager like an outboard motor, it's housed more like an automobile engine.
** various comp structs have been merged into other places (eg. E_Comp_Zone is now just part of E_Zone where applicable), leading to a large deduplication of attributes
** awful E_Comp_Win is totally dead, having been replaced with e_comp_object smart objects which work just like normal canvas objects
** protocol-specific window management and compositor functionality is now kept exclusively in backend files
** e_pixmap api provides generic client finding and rendering api
** screen/xinerama screens are now provided directly by compositor on startup and re-set on change
** e_comp_render_update finally replaced with eina_tiler
** wayland compositor no longer creates X windows
** compositor e_layout removed entirely
* e_container is gone. this was made unnecessary in E18, but I kept it to avoid having too much code churn in one release. its sole purpose was to catch some events and handle window stacking, both of which are now just done by the compositor infra
* e_manager is just for screensaver and keybind stuff now, possibly remove later?
* e_border is gone along with a lot of its api. e_client has replaced it, and e_client has been rewritten completely; some parts may be similar, but the design now relies upon having a functional compositor
** window configuration/focus functions are all removed. all windows are now managed solely with evas_object_X functions on the "frame" member of a client, just as any other canvas object can be managed.
*** do NOT set interceptors on a client's comp_object. seriously.
* startup order rewritten: compositor now starts much earlier, other things just use attrs and members of the compositor
* ecore_x_pointer_xy_get usage replaced with ecore_evas_pointer_xy_get
* e_popup is totally gone, existing usage replaced by e_comp_object_util_add where applicable, otherwise just placed normally on the canvas
* deskmirror is (more) broken for now
* illume is totally fucked
* Ecore_X_Window replaced with Ecore_Window in most cases
* edge binding XWindows replaced with regular canvas objects
* some E_Win functionality has changed such that delete callbacks are now correctly called in ALL cases. various dialogs have been updated to not crash as a result
comp files and descriptions:
e_comp.c - overall compositor functions, rendering/update loop, shape cutting
e_comp_x.c - X window management and compositor functionality
e_comp_wl.c - Wayland surface management and compositor functionality
e_comp_canvas.c - general compositor canvas functions and utilities
e_comp_object.c - E_Client->frame member for managing clients as Evas_Objects, utility functions for adding objects to the compositor rendering systems
additional authors: ivan.briano@intel.com
feature: new compositor
removal: e_border, e_container, e_popup
2014-01-14 17:19:12 -08:00
|
|
|
static E_Client *_e_mod_sft_win_border_get(E_Zone *zone, int x, int y);
|
2010-02-18 19:00:58 -08:00
|
|
|
|
|
|
|
Sft_Win *
|
|
|
|
e_mod_sft_win_new(E_Zone *zone)
|
|
|
|
{
|
|
|
|
Sft_Win *swin;
|
|
|
|
Ecore_X_Window_State states[2];
|
2012-02-14 20:19:47 -08:00
|
|
|
Evas_Coord mw = 0, mh = 0;
|
|
|
|
|
2010-02-18 19:00:58 -08:00
|
|
|
/* create our new softkey window object */
|
|
|
|
swin = E_OBJECT_ALLOC(Sft_Win, SFT_WIN_TYPE, _e_mod_sft_win_cb_free);
|
|
|
|
if (!swin) return NULL;
|
|
|
|
|
|
|
|
swin->zone = zone;
|
|
|
|
|
|
|
|
/* hook into property change so we can adjust w/ e_scale */
|
2010-02-27 11:50:07 -08:00
|
|
|
swin->hdls =
|
|
|
|
eina_list_append(swin->hdls,
|
|
|
|
ecore_event_handler_add(ECORE_X_EVENT_WINDOW_PROPERTY,
|
|
|
|
_e_mod_sft_win_cb_win_prop, swin));
|
|
|
|
|
|
|
|
/* hook into zone resize so we can adjust min width */
|
|
|
|
swin->hdls =
|
|
|
|
eina_list_append(swin->hdls,
|
|
|
|
ecore_event_handler_add(E_EVENT_ZONE_MOVE_RESIZE,
|
|
|
|
_e_mod_sft_win_cb_zone_resize,
|
|
|
|
swin));
|
2010-02-18 19:00:58 -08:00
|
|
|
|
|
|
|
/* create new window */
|
2015-03-13 14:44:24 -07:00
|
|
|
swin->win = e_win_new(e_comp);
|
2010-02-18 19:00:58 -08:00
|
|
|
swin->win->data = swin;
|
|
|
|
|
|
|
|
/* set some properties on the window */
|
|
|
|
e_win_title_set(swin->win, _("Illume Softkey"));
|
|
|
|
e_win_name_class_set(swin->win, "Illume-Softkey", "Illume-Softkey");
|
|
|
|
e_win_no_remember_set(swin->win, EINA_TRUE);
|
|
|
|
|
|
|
|
/* hook into window resize so we can resize our objects */
|
2014-11-02 18:35:13 -08:00
|
|
|
evas_object_resize_callback_set(swin->win, _e_mod_sft_win_cb_resize);
|
2010-02-18 19:00:58 -08:00
|
|
|
|
|
|
|
/* set this window to not show in taskbar or pager */
|
|
|
|
states[0] = ECORE_X_WINDOW_STATE_SKIP_TASKBAR;
|
|
|
|
states[1] = ECORE_X_WINDOW_STATE_SKIP_PAGER;
|
|
|
|
ecore_x_netwm_window_state_set(swin->win->evas_win, states, 2);
|
|
|
|
|
|
|
|
/* set this window to not accept or take focus */
|
|
|
|
ecore_x_icccm_hints_set(swin->win->evas_win, 0, 0, 0, 0, 0, 0, 0);
|
|
|
|
|
|
|
|
/* create our base object */
|
|
|
|
swin->o_base = edje_object_add(swin->win->evas);
|
|
|
|
if (!e_theme_edje_object_set(swin->o_base,
|
|
|
|
"base/theme/modules/illume-softkey",
|
|
|
|
"modules/illume-softkey/window"))
|
|
|
|
{
|
|
|
|
char buff[PATH_MAX];
|
|
|
|
|
|
|
|
snprintf(buff, sizeof(buff),
|
|
|
|
"%s/e-module-illume-softkey.edj", _sft_mod_dir);
|
|
|
|
edje_object_file_set(swin->o_base, buff,
|
|
|
|
"modules/illume-softkey/window");
|
|
|
|
}
|
|
|
|
evas_object_move(swin->o_base, 0, 0);
|
|
|
|
evas_object_show(swin->o_base);
|
|
|
|
|
|
|
|
/* create default buttons */
|
|
|
|
_e_mod_sft_win_create_default_buttons(swin);
|
|
|
|
|
2011-01-29 13:08:13 -08:00
|
|
|
/* create default buttons */
|
|
|
|
_e_mod_sft_win_create_extra_buttons(swin);
|
|
|
|
|
2012-02-14 20:19:47 -08:00
|
|
|
edje_object_size_min_calc(swin->o_base, &mw, &mh);
|
giant comp rejiggering commit #6:
* border->fx REMOVED, related border api REMOVED
* comp edc has new class of groups: e/comp/effects[/auto]
** these are effects which can be applied to any compositor object through the e_comp_win_effect* api and are written in embryo
*** two types - base and auto - base = manual, for use with animators; auto are "trigger and forget", for use as actual effects
* desk flip transition animations moved to comp effects and FIXED(ish)
* "zoom" effect renamed to "diagonal" for slightly less misleading name since it never did any zooming
* actual "zoom" effect added
* border hierarchy now as follows: cw->effect_obj swallows cw->shobj, cw->shobj swallows cw->bd->bg_object ?: cw->obj, if (cw->bd->bg_object) cw->bd->bg_object swallows cw->obj
** cw->effect_obj now used for all positioning and comp logic
** cw->effect_obj ONLY used for object transformation effects (moving, zooming, fading, etc)
** cw->shobj ONLY for comp visual/non-movement effects (focus effect, unfocus opacity, legacy shadows); this is a candidate for removal/rewrite in E19
* even more comp shape rewrites
* desk flip animation time now controlled by theme since edje doesn't support setting transition time in C; related config value removed
* desk flip transitions (in e_desk.c) rewritten
* various modules (evry/illume2) updated to use comp effects instead of fx offset
* desk flip configuration BROKEN(ish)
2013-02-28 07:20:32 -08:00
|
|
|
|
|
|
|
mh = E_CLAMP(mh, 10, zone->h / 3);
|
2010-02-18 19:00:58 -08:00
|
|
|
/* set minimum size of this window */
|
2014-11-02 18:35:13 -08:00
|
|
|
evas_object_size_hint_min_set(swin->win, zone->w, mh);
|
2010-02-18 19:00:58 -08:00
|
|
|
|
|
|
|
/* position and resize this window */
|
2014-11-02 18:35:13 -08:00
|
|
|
evas_object_geometry_set(swin->win, zone->x,
|
2010-08-16 07:07:37 -07:00
|
|
|
(zone->y + zone->h - (il_sft_cfg->height * e_scale)),
|
2012-02-14 20:19:47 -08:00
|
|
|
zone->w, mh);
|
2010-02-18 19:00:58 -08:00
|
|
|
|
|
|
|
/* show the window */
|
2014-11-02 18:35:13 -08:00
|
|
|
evas_object_show(swin->win);
|
2010-02-18 19:00:58 -08:00
|
|
|
|
compositor rewrite / charlie-foxtrot situation
huge fustercluck commit because there wasn't really a way to separate out the changes. better to just rip it all out at once.
* compositor and window management completely rewritten. this was the goal for E19, but it pretty much required everything existing to be scrapped since it wasn't optimized, streamlined, or sensible. now instead of having the compositor strapped to the window manager like an outboard motor, it's housed more like an automobile engine.
** various comp structs have been merged into other places (eg. E_Comp_Zone is now just part of E_Zone where applicable), leading to a large deduplication of attributes
** awful E_Comp_Win is totally dead, having been replaced with e_comp_object smart objects which work just like normal canvas objects
** protocol-specific window management and compositor functionality is now kept exclusively in backend files
** e_pixmap api provides generic client finding and rendering api
** screen/xinerama screens are now provided directly by compositor on startup and re-set on change
** e_comp_render_update finally replaced with eina_tiler
** wayland compositor no longer creates X windows
** compositor e_layout removed entirely
* e_container is gone. this was made unnecessary in E18, but I kept it to avoid having too much code churn in one release. its sole purpose was to catch some events and handle window stacking, both of which are now just done by the compositor infra
* e_manager is just for screensaver and keybind stuff now, possibly remove later?
* e_border is gone along with a lot of its api. e_client has replaced it, and e_client has been rewritten completely; some parts may be similar, but the design now relies upon having a functional compositor
** window configuration/focus functions are all removed. all windows are now managed solely with evas_object_X functions on the "frame" member of a client, just as any other canvas object can be managed.
*** do NOT set interceptors on a client's comp_object. seriously.
* startup order rewritten: compositor now starts much earlier, other things just use attrs and members of the compositor
* ecore_x_pointer_xy_get usage replaced with ecore_evas_pointer_xy_get
* e_popup is totally gone, existing usage replaced by e_comp_object_util_add where applicable, otherwise just placed normally on the canvas
* deskmirror is (more) broken for now
* illume is totally fucked
* Ecore_X_Window replaced with Ecore_Window in most cases
* edge binding XWindows replaced with regular canvas objects
* some E_Win functionality has changed such that delete callbacks are now correctly called in ALL cases. various dialogs have been updated to not crash as a result
comp files and descriptions:
e_comp.c - overall compositor functions, rendering/update loop, shape cutting
e_comp_x.c - X window management and compositor functionality
e_comp_wl.c - Wayland surface management and compositor functionality
e_comp_canvas.c - general compositor canvas functions and utilities
e_comp_object.c - E_Client->frame member for managing clients as Evas_Objects, utility functions for adding objects to the compositor rendering systems
additional authors: ivan.briano@intel.com
feature: new compositor
removal: e_border, e_container, e_popup
2014-01-14 17:19:12 -08:00
|
|
|
e_client_zone_set(swin->win->client, zone);
|
|
|
|
swin->win->client->user_skip_winlist = 1;
|
2010-02-18 19:00:58 -08:00
|
|
|
|
compositor rewrite / charlie-foxtrot situation
huge fustercluck commit because there wasn't really a way to separate out the changes. better to just rip it all out at once.
* compositor and window management completely rewritten. this was the goal for E19, but it pretty much required everything existing to be scrapped since it wasn't optimized, streamlined, or sensible. now instead of having the compositor strapped to the window manager like an outboard motor, it's housed more like an automobile engine.
** various comp structs have been merged into other places (eg. E_Comp_Zone is now just part of E_Zone where applicable), leading to a large deduplication of attributes
** awful E_Comp_Win is totally dead, having been replaced with e_comp_object smart objects which work just like normal canvas objects
** protocol-specific window management and compositor functionality is now kept exclusively in backend files
** e_pixmap api provides generic client finding and rendering api
** screen/xinerama screens are now provided directly by compositor on startup and re-set on change
** e_comp_render_update finally replaced with eina_tiler
** wayland compositor no longer creates X windows
** compositor e_layout removed entirely
* e_container is gone. this was made unnecessary in E18, but I kept it to avoid having too much code churn in one release. its sole purpose was to catch some events and handle window stacking, both of which are now just done by the compositor infra
* e_manager is just for screensaver and keybind stuff now, possibly remove later?
* e_border is gone along with a lot of its api. e_client has replaced it, and e_client has been rewritten completely; some parts may be similar, but the design now relies upon having a functional compositor
** window configuration/focus functions are all removed. all windows are now managed solely with evas_object_X functions on the "frame" member of a client, just as any other canvas object can be managed.
*** do NOT set interceptors on a client's comp_object. seriously.
* startup order rewritten: compositor now starts much earlier, other things just use attrs and members of the compositor
* ecore_x_pointer_xy_get usage replaced with ecore_evas_pointer_xy_get
* e_popup is totally gone, existing usage replaced by e_comp_object_util_add where applicable, otherwise just placed normally on the canvas
* deskmirror is (more) broken for now
* illume is totally fucked
* Ecore_X_Window replaced with Ecore_Window in most cases
* edge binding XWindows replaced with regular canvas objects
* some E_Win functionality has changed such that delete callbacks are now correctly called in ALL cases. various dialogs have been updated to not crash as a result
comp files and descriptions:
e_comp.c - overall compositor functions, rendering/update loop, shape cutting
e_comp_x.c - X window management and compositor functionality
e_comp_wl.c - Wayland surface management and compositor functionality
e_comp_canvas.c - general compositor canvas functions and utilities
e_comp_object.c - E_Client->frame member for managing clients as Evas_Objects, utility functions for adding objects to the compositor rendering systems
additional authors: ivan.briano@intel.com
feature: new compositor
removal: e_border, e_container, e_popup
2014-01-14 17:19:12 -08:00
|
|
|
swin->win->client->lock_focus_in = 1;
|
|
|
|
swin->win->client->lock_focus_out = 1;
|
2011-06-28 16:42:15 -07:00
|
|
|
|
2010-02-18 19:00:58 -08:00
|
|
|
/* set this window to be a dock window. This needs to be done after show
|
|
|
|
* as E will sometimes reset the window type */
|
compositor rewrite / charlie-foxtrot situation
huge fustercluck commit because there wasn't really a way to separate out the changes. better to just rip it all out at once.
* compositor and window management completely rewritten. this was the goal for E19, but it pretty much required everything existing to be scrapped since it wasn't optimized, streamlined, or sensible. now instead of having the compositor strapped to the window manager like an outboard motor, it's housed more like an automobile engine.
** various comp structs have been merged into other places (eg. E_Comp_Zone is now just part of E_Zone where applicable), leading to a large deduplication of attributes
** awful E_Comp_Win is totally dead, having been replaced with e_comp_object smart objects which work just like normal canvas objects
** protocol-specific window management and compositor functionality is now kept exclusively in backend files
** e_pixmap api provides generic client finding and rendering api
** screen/xinerama screens are now provided directly by compositor on startup and re-set on change
** e_comp_render_update finally replaced with eina_tiler
** wayland compositor no longer creates X windows
** compositor e_layout removed entirely
* e_container is gone. this was made unnecessary in E18, but I kept it to avoid having too much code churn in one release. its sole purpose was to catch some events and handle window stacking, both of which are now just done by the compositor infra
* e_manager is just for screensaver and keybind stuff now, possibly remove later?
* e_border is gone along with a lot of its api. e_client has replaced it, and e_client has been rewritten completely; some parts may be similar, but the design now relies upon having a functional compositor
** window configuration/focus functions are all removed. all windows are now managed solely with evas_object_X functions on the "frame" member of a client, just as any other canvas object can be managed.
*** do NOT set interceptors on a client's comp_object. seriously.
* startup order rewritten: compositor now starts much earlier, other things just use attrs and members of the compositor
* ecore_x_pointer_xy_get usage replaced with ecore_evas_pointer_xy_get
* e_popup is totally gone, existing usage replaced by e_comp_object_util_add where applicable, otherwise just placed normally on the canvas
* deskmirror is (more) broken for now
* illume is totally fucked
* Ecore_X_Window replaced with Ecore_Window in most cases
* edge binding XWindows replaced with regular canvas objects
* some E_Win functionality has changed such that delete callbacks are now correctly called in ALL cases. various dialogs have been updated to not crash as a result
comp files and descriptions:
e_comp.c - overall compositor functions, rendering/update loop, shape cutting
e_comp_x.c - X window management and compositor functionality
e_comp_wl.c - Wayland surface management and compositor functionality
e_comp_canvas.c - general compositor canvas functions and utilities
e_comp_object.c - E_Client->frame member for managing clients as Evas_Objects, utility functions for adding objects to the compositor rendering systems
additional authors: ivan.briano@intel.com
feature: new compositor
removal: e_border, e_container, e_popup
2014-01-14 17:19:12 -08:00
|
|
|
ecore_x_netwm_window_type_set(swin->win->evas_win, E_WINDOW_TYPE_DOCK);
|
2010-02-18 19:00:58 -08:00
|
|
|
|
|
|
|
/* tell conformant apps our position and size */
|
|
|
|
ecore_x_e_illume_softkey_geometry_set(zone->black_win,
|
2010-08-16 07:07:37 -07:00
|
|
|
zone->x,
|
|
|
|
(zone->h - (il_sft_cfg->height * e_scale)),
|
|
|
|
zone->w,
|
|
|
|
(il_sft_cfg->height * e_scale));
|
2010-02-18 19:00:58 -08:00
|
|
|
|
|
|
|
return swin;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* local functions */
|
|
|
|
static void
|
|
|
|
_e_mod_sft_win_cb_free(Sft_Win *swin)
|
|
|
|
{
|
2010-02-27 11:50:07 -08:00
|
|
|
Ecore_Event_Handler *hdl;
|
2010-02-18 19:00:58 -08:00
|
|
|
const Evas_Object *box;
|
|
|
|
|
2010-02-27 11:50:07 -08:00
|
|
|
/* delete the event handlers */
|
|
|
|
EINA_LIST_FREE(swin->hdls, hdl)
|
|
|
|
ecore_event_handler_del(hdl);
|
2010-02-18 19:00:58 -08:00
|
|
|
|
2010-08-19 12:40:57 -07:00
|
|
|
if ((box = edje_object_part_object_get(swin->o_base, "e.box.buttons")))
|
2010-02-18 19:00:58 -08:00
|
|
|
{
|
|
|
|
Evas_Object *btn;
|
|
|
|
|
|
|
|
/* delete the buttons */
|
|
|
|
EINA_LIST_FREE(swin->btns, btn)
|
|
|
|
{
|
|
|
|
edje_object_part_box_remove(swin->o_base, "e.box.buttons", btn);
|
|
|
|
evas_object_del(btn);
|
|
|
|
}
|
|
|
|
}
|
2010-08-19 12:40:57 -07:00
|
|
|
if ((box = edje_object_part_object_get(swin->o_base, "e.box.extra_buttons")))
|
2010-02-18 19:00:58 -08:00
|
|
|
{
|
|
|
|
Evas_Object *btn;
|
|
|
|
|
|
|
|
/* delete the buttons */
|
|
|
|
EINA_LIST_FREE(swin->extra_btns, btn)
|
|
|
|
{
|
2010-08-16 07:07:37 -07:00
|
|
|
edje_object_part_box_remove(swin->o_base,
|
|
|
|
"e.box.extra_buttons", btn);
|
2010-02-18 19:00:58 -08:00
|
|
|
evas_object_del(btn);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/* delete the objects */
|
|
|
|
if (swin->o_base) evas_object_del(swin->o_base);
|
|
|
|
swin->o_base = NULL;
|
|
|
|
|
|
|
|
/* delete the window */
|
|
|
|
if (swin->win) e_object_del(E_OBJECT(swin->win));
|
|
|
|
swin->win = NULL;
|
|
|
|
|
|
|
|
/* tell conformant apps our position and size */
|
|
|
|
ecore_x_e_illume_softkey_geometry_set(swin->zone->black_win, 0, 0, 0, 0);
|
|
|
|
|
|
|
|
/* free the allocated object */
|
|
|
|
E_FREE(swin);
|
|
|
|
}
|
|
|
|
|
2010-06-24 09:19:12 -07:00
|
|
|
static Eina_Bool
|
2010-02-18 19:00:58 -08:00
|
|
|
_e_mod_sft_win_cb_win_prop(void *data, int type __UNUSED__, void *event)
|
|
|
|
{
|
|
|
|
Sft_Win *swin;
|
|
|
|
Ecore_X_Event_Window_Property *ev;
|
|
|
|
|
|
|
|
ev = event;
|
|
|
|
|
2010-06-24 09:19:12 -07:00
|
|
|
if (!(swin = data)) return ECORE_CALLBACK_PASS_ON;
|
compositor rewrite / charlie-foxtrot situation
huge fustercluck commit because there wasn't really a way to separate out the changes. better to just rip it all out at once.
* compositor and window management completely rewritten. this was the goal for E19, but it pretty much required everything existing to be scrapped since it wasn't optimized, streamlined, or sensible. now instead of having the compositor strapped to the window manager like an outboard motor, it's housed more like an automobile engine.
** various comp structs have been merged into other places (eg. E_Comp_Zone is now just part of E_Zone where applicable), leading to a large deduplication of attributes
** awful E_Comp_Win is totally dead, having been replaced with e_comp_object smart objects which work just like normal canvas objects
** protocol-specific window management and compositor functionality is now kept exclusively in backend files
** e_pixmap api provides generic client finding and rendering api
** screen/xinerama screens are now provided directly by compositor on startup and re-set on change
** e_comp_render_update finally replaced with eina_tiler
** wayland compositor no longer creates X windows
** compositor e_layout removed entirely
* e_container is gone. this was made unnecessary in E18, but I kept it to avoid having too much code churn in one release. its sole purpose was to catch some events and handle window stacking, both of which are now just done by the compositor infra
* e_manager is just for screensaver and keybind stuff now, possibly remove later?
* e_border is gone along with a lot of its api. e_client has replaced it, and e_client has been rewritten completely; some parts may be similar, but the design now relies upon having a functional compositor
** window configuration/focus functions are all removed. all windows are now managed solely with evas_object_X functions on the "frame" member of a client, just as any other canvas object can be managed.
*** do NOT set interceptors on a client's comp_object. seriously.
* startup order rewritten: compositor now starts much earlier, other things just use attrs and members of the compositor
* ecore_x_pointer_xy_get usage replaced with ecore_evas_pointer_xy_get
* e_popup is totally gone, existing usage replaced by e_comp_object_util_add where applicable, otherwise just placed normally on the canvas
* deskmirror is (more) broken for now
* illume is totally fucked
* Ecore_X_Window replaced with Ecore_Window in most cases
* edge binding XWindows replaced with regular canvas objects
* some E_Win functionality has changed such that delete callbacks are now correctly called in ALL cases. various dialogs have been updated to not crash as a result
comp files and descriptions:
e_comp.c - overall compositor functions, rendering/update loop, shape cutting
e_comp_x.c - X window management and compositor functionality
e_comp_wl.c - Wayland surface management and compositor functionality
e_comp_canvas.c - general compositor canvas functions and utilities
e_comp_object.c - E_Client->frame member for managing clients as Evas_Objects, utility functions for adding objects to the compositor rendering systems
additional authors: ivan.briano@intel.com
feature: new compositor
removal: e_border, e_container, e_popup
2014-01-14 17:19:12 -08:00
|
|
|
if (ev->win != swin->win->comp->man->root)
|
2010-08-16 07:07:37 -07:00
|
|
|
return ECORE_CALLBACK_PASS_ON;
|
2010-06-24 09:19:12 -07:00
|
|
|
if (ev->atom != ATM_ENLIGHTENMENT_SCALE) return ECORE_CALLBACK_PASS_ON;
|
2010-02-18 19:00:58 -08:00
|
|
|
|
|
|
|
/* set minimum size of this window */
|
2014-11-02 18:35:13 -08:00
|
|
|
evas_object_size_hint_min_set(swin->win, swin->zone->w, (il_sft_cfg->height * e_scale));
|
2010-02-18 19:00:58 -08:00
|
|
|
|
2010-02-22 17:21:47 -08:00
|
|
|
/* NB: Not sure why, but we need to tell this border to fetch icccm
|
|
|
|
* size position hints now :( (NOTE: This was not needed a few days ago)
|
|
|
|
* If we do not do this, than softkey does not change w/ scale anymore */
|
compositor rewrite / charlie-foxtrot situation
huge fustercluck commit because there wasn't really a way to separate out the changes. better to just rip it all out at once.
* compositor and window management completely rewritten. this was the goal for E19, but it pretty much required everything existing to be scrapped since it wasn't optimized, streamlined, or sensible. now instead of having the compositor strapped to the window manager like an outboard motor, it's housed more like an automobile engine.
** various comp structs have been merged into other places (eg. E_Comp_Zone is now just part of E_Zone where applicable), leading to a large deduplication of attributes
** awful E_Comp_Win is totally dead, having been replaced with e_comp_object smart objects which work just like normal canvas objects
** protocol-specific window management and compositor functionality is now kept exclusively in backend files
** e_pixmap api provides generic client finding and rendering api
** screen/xinerama screens are now provided directly by compositor on startup and re-set on change
** e_comp_render_update finally replaced with eina_tiler
** wayland compositor no longer creates X windows
** compositor e_layout removed entirely
* e_container is gone. this was made unnecessary in E18, but I kept it to avoid having too much code churn in one release. its sole purpose was to catch some events and handle window stacking, both of which are now just done by the compositor infra
* e_manager is just for screensaver and keybind stuff now, possibly remove later?
* e_border is gone along with a lot of its api. e_client has replaced it, and e_client has been rewritten completely; some parts may be similar, but the design now relies upon having a functional compositor
** window configuration/focus functions are all removed. all windows are now managed solely with evas_object_X functions on the "frame" member of a client, just as any other canvas object can be managed.
*** do NOT set interceptors on a client's comp_object. seriously.
* startup order rewritten: compositor now starts much earlier, other things just use attrs and members of the compositor
* ecore_x_pointer_xy_get usage replaced with ecore_evas_pointer_xy_get
* e_popup is totally gone, existing usage replaced by e_comp_object_util_add where applicable, otherwise just placed normally on the canvas
* deskmirror is (more) broken for now
* illume is totally fucked
* Ecore_X_Window replaced with Ecore_Window in most cases
* edge binding XWindows replaced with regular canvas objects
* some E_Win functionality has changed such that delete callbacks are now correctly called in ALL cases. various dialogs have been updated to not crash as a result
comp files and descriptions:
e_comp.c - overall compositor functions, rendering/update loop, shape cutting
e_comp_x.c - X window management and compositor functionality
e_comp_wl.c - Wayland surface management and compositor functionality
e_comp_canvas.c - general compositor canvas functions and utilities
e_comp_object.c - E_Client->frame member for managing clients as Evas_Objects, utility functions for adding objects to the compositor rendering systems
additional authors: ivan.briano@intel.com
feature: new compositor
removal: e_border, e_container, e_popup
2014-01-14 17:19:12 -08:00
|
|
|
swin->win->client->icccm.fetch.size_pos_hints = 1;
|
2010-02-22 17:21:47 -08:00
|
|
|
|
2010-02-18 19:00:58 -08:00
|
|
|
/* resize this window */
|
2014-11-02 18:35:13 -08:00
|
|
|
evas_object_resize(swin->win, swin->zone->w, (il_sft_cfg->height * e_scale));
|
2010-02-18 19:00:58 -08:00
|
|
|
|
|
|
|
/* tell conformant apps our position and size */
|
|
|
|
ecore_x_e_illume_softkey_geometry_set(swin->zone->black_win,
|
|
|
|
swin->win->x, swin->win->y,
|
2010-08-16 07:07:37 -07:00
|
|
|
swin->win->w,
|
|
|
|
(il_sft_cfg->height * e_scale));
|
2010-06-24 09:19:12 -07:00
|
|
|
return ECORE_CALLBACK_PASS_ON;
|
2010-02-18 19:00:58 -08:00
|
|
|
}
|
|
|
|
|
2010-06-24 09:19:12 -07:00
|
|
|
static Eina_Bool
|
2010-02-27 11:50:07 -08:00
|
|
|
_e_mod_sft_win_cb_zone_resize(void *data, int type __UNUSED__, void *event)
|
|
|
|
{
|
|
|
|
Sft_Win *swin;
|
|
|
|
E_Event_Zone_Move_Resize *ev;
|
|
|
|
|
|
|
|
ev = event;
|
2010-06-24 09:19:12 -07:00
|
|
|
if (!(swin = data)) return ECORE_CALLBACK_PASS_ON;
|
|
|
|
if (ev->zone != swin->zone) return ECORE_CALLBACK_PASS_ON;
|
2010-02-27 11:50:07 -08:00
|
|
|
|
|
|
|
/* set minimum size of this window */
|
2014-11-02 18:35:13 -08:00
|
|
|
evas_object_size_hint_min_set(swin->win, ev->zone->w, (il_sft_cfg->height * e_scale));
|
2010-02-27 11:50:07 -08:00
|
|
|
|
2010-06-24 09:19:12 -07:00
|
|
|
return ECORE_CALLBACK_PASS_ON;
|
2010-02-27 11:50:07 -08:00
|
|
|
}
|
|
|
|
|
2010-02-18 19:00:58 -08:00
|
|
|
static void
|
|
|
|
_e_mod_sft_win_cb_resize(E_Win *win)
|
|
|
|
{
|
|
|
|
Sft_Win *swin;
|
|
|
|
Evas_Object *btn;
|
|
|
|
const Evas_Object *box;
|
|
|
|
Eina_List *l;
|
|
|
|
int mw, mh;
|
|
|
|
|
|
|
|
if (!(swin = win->data)) return;
|
|
|
|
|
|
|
|
/* adjust button(s) size for e_scale */
|
|
|
|
EINA_LIST_FOREACH(swin->btns, l, btn)
|
|
|
|
{
|
|
|
|
e_widget_size_min_get(btn, &mw, &mh);
|
|
|
|
evas_object_size_hint_min_set(btn, (mw * e_scale), (mh * e_scale));
|
|
|
|
evas_object_resize(btn, (mw * e_scale), (mh * e_scale));
|
|
|
|
}
|
|
|
|
|
|
|
|
/* adjust box size for content */
|
2010-08-19 12:40:57 -07:00
|
|
|
if ((box = edje_object_part_object_get(swin->o_base, "e.box.buttons")))
|
2010-02-18 19:00:58 -08:00
|
|
|
{
|
|
|
|
evas_object_size_hint_min_get((Evas_Object *)box, &mw, &mh);
|
|
|
|
evas_object_resize((Evas_Object *)box, mw, mh);
|
|
|
|
}
|
|
|
|
|
|
|
|
mw = mh = 0;
|
|
|
|
/* adjust button(s) size for e_scale */
|
|
|
|
EINA_LIST_FOREACH(swin->extra_btns, l, btn)
|
|
|
|
{
|
|
|
|
e_widget_size_min_get(btn, &mw, &mh);
|
|
|
|
evas_object_size_hint_min_set(btn, (mw * e_scale), (mh * e_scale));
|
|
|
|
evas_object_resize(btn, (mw * e_scale), (mh * e_scale));
|
|
|
|
}
|
|
|
|
|
|
|
|
/* adjust box size for content */
|
2010-08-19 12:40:57 -07:00
|
|
|
if ((box = edje_object_part_object_get(swin->o_base, "e.box.extra_buttons")))
|
2010-02-18 19:00:58 -08:00
|
|
|
{
|
|
|
|
evas_object_size_hint_min_get((Evas_Object *)box, &mw, &mh);
|
|
|
|
evas_object_resize((Evas_Object *)box, mw, mh);
|
|
|
|
}
|
|
|
|
|
|
|
|
/* resize the base object */
|
|
|
|
if (swin->o_base) evas_object_resize(swin->o_base, win->w, win->h);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
_e_mod_sft_win_create_default_buttons(Sft_Win *swin)
|
|
|
|
{
|
|
|
|
Evas_Object *btn;
|
|
|
|
int mw, mh;
|
|
|
|
|
|
|
|
/* create back button */
|
|
|
|
btn = e_widget_button_add(swin->win->evas, _("Back"), "go-previous",
|
|
|
|
_e_mod_sft_win_cb_back, swin, NULL);
|
|
|
|
e_widget_size_min_get(btn, &mw, &mh);
|
|
|
|
evas_object_size_hint_min_set(btn, (mw * e_scale), (mh * e_scale));
|
|
|
|
|
|
|
|
/* NB: this show is required when packing e_widgets into an edje box else
|
|
|
|
* the widgets do not receive any events */
|
|
|
|
evas_object_show(btn);
|
|
|
|
|
|
|
|
/* add button to box */
|
|
|
|
edje_object_part_box_append(swin->o_base, "e.box.buttons", btn);
|
|
|
|
|
|
|
|
/* add button to our list */
|
|
|
|
swin->btns = eina_list_append(swin->btns, btn);
|
|
|
|
|
2010-10-05 12:15:39 -07:00
|
|
|
/* create forward button */
|
|
|
|
btn = e_widget_button_add(swin->win->evas, _("Forward"), "go-next",
|
|
|
|
_e_mod_sft_win_cb_forward, swin, NULL);
|
|
|
|
e_widget_size_min_get(btn, &mw, &mh);
|
|
|
|
evas_object_size_hint_min_set(btn, (mw * e_scale), (mh * e_scale));
|
|
|
|
|
|
|
|
/* NB: this show is required when packing e_widgets into an edje box else
|
|
|
|
* the widgets do not receive any events */
|
|
|
|
evas_object_show(btn);
|
|
|
|
|
|
|
|
/* add button to box */
|
|
|
|
edje_object_part_box_append(swin->o_base, "e.box.buttons", btn);
|
2010-02-18 19:00:58 -08:00
|
|
|
|
2010-10-05 12:15:39 -07:00
|
|
|
/* add button to our list */
|
|
|
|
swin->btns = eina_list_append(swin->btns, btn);
|
2010-02-18 19:00:58 -08:00
|
|
|
/* create close button */
|
2010-08-05 20:51:58 -07:00
|
|
|
btn = e_widget_button_add(swin->win->evas, _("Close"), "application-exit",
|
2010-02-18 19:00:58 -08:00
|
|
|
_e_mod_sft_win_cb_close, swin, NULL);
|
|
|
|
e_widget_size_min_get(btn, &mw, &mh);
|
|
|
|
evas_object_size_hint_min_set(btn, (mw * e_scale), (mh * e_scale));
|
|
|
|
|
|
|
|
/* NB: this show is required when packing e_widgets into an edje box else
|
|
|
|
* the widgets do not receive any events */
|
|
|
|
evas_object_show(btn);
|
|
|
|
|
|
|
|
/* add button to box */
|
|
|
|
edje_object_part_box_append(swin->o_base, "e.box.buttons", btn);
|
|
|
|
|
|
|
|
/* add button to our list */
|
|
|
|
swin->btns = eina_list_append(swin->btns, btn);
|
|
|
|
}
|
|
|
|
|
2011-01-29 13:08:13 -08:00
|
|
|
static void
|
|
|
|
_e_mod_sft_win_create_extra_buttons(Sft_Win *swin)
|
|
|
|
{
|
|
|
|
Evas_Object *btn;
|
|
|
|
int mw, mh;
|
|
|
|
|
|
|
|
/* create window toggle button */
|
|
|
|
btn = e_widget_button_add(swin->win->evas, _("Switch"), "view-refresh",
|
|
|
|
_e_mod_sft_win_cb_win_pos, swin, NULL);
|
|
|
|
e_widget_size_min_get(btn, &mw, &mh);
|
|
|
|
evas_object_size_hint_min_set(btn, (mw * e_scale), (mh * e_scale));
|
|
|
|
|
|
|
|
/* NB: this show is required when packing e_widgets into an edje box else
|
|
|
|
* the widgets do not receive any events */
|
|
|
|
evas_object_show(btn);
|
|
|
|
|
|
|
|
/* add button to box */
|
|
|
|
edje_object_part_box_append(swin->o_base, "e.box.extra_buttons", btn);
|
|
|
|
|
|
|
|
/* add button to our list */
|
|
|
|
swin->extra_btns = eina_list_append(swin->extra_btns, btn);
|
|
|
|
}
|
|
|
|
|
2010-02-18 19:00:58 -08:00
|
|
|
static void
|
|
|
|
_e_mod_sft_win_cb_close(void *data, void *data2 __UNUSED__)
|
|
|
|
{
|
|
|
|
Sft_Win *swin;
|
|
|
|
|
|
|
|
if (!(swin = data)) return;
|
|
|
|
ecore_x_e_illume_close_send(swin->zone->black_win);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
_e_mod_sft_win_cb_back(void *data, void *data2 __UNUSED__)
|
|
|
|
{
|
|
|
|
Sft_Win *swin;
|
|
|
|
|
|
|
|
if (!(swin = data)) return;
|
|
|
|
ecore_x_e_illume_focus_back_send(swin->zone->black_win);
|
|
|
|
}
|
2010-10-05 12:15:39 -07:00
|
|
|
|
|
|
|
static void
|
|
|
|
_e_mod_sft_win_cb_forward(void *data, void *data2 __UNUSED__)
|
|
|
|
{
|
|
|
|
Sft_Win *swin;
|
|
|
|
|
|
|
|
if (!(swin = data)) return;
|
|
|
|
ecore_x_e_illume_focus_forward_send(swin->zone->black_win);
|
|
|
|
}
|
2011-01-29 13:08:13 -08:00
|
|
|
|
|
|
|
static void
|
|
|
|
_e_mod_sft_win_cb_win_pos(void *data, void *data2 __UNUSED__)
|
|
|
|
{
|
|
|
|
Sft_Win *swin;
|
|
|
|
Ecore_X_Illume_Mode mode;
|
|
|
|
|
|
|
|
if (!(swin = data)) return;
|
|
|
|
mode = ecore_x_e_illume_mode_get(swin->zone->black_win);
|
|
|
|
switch (mode)
|
|
|
|
{
|
|
|
|
case ECORE_X_ILLUME_MODE_UNKNOWN:
|
|
|
|
case ECORE_X_ILLUME_MODE_SINGLE:
|
|
|
|
break;
|
|
|
|
case ECORE_X_ILLUME_MODE_DUAL_TOP:
|
|
|
|
_e_mod_sft_win_pos_toggle_top(swin);
|
|
|
|
break;
|
|
|
|
case ECORE_X_ILLUME_MODE_DUAL_LEFT:
|
|
|
|
_e_mod_sft_win_pos_toggle_left(swin);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
_e_mod_sft_win_pos_toggle_top(Sft_Win *swin)
|
|
|
|
{
|
compositor rewrite / charlie-foxtrot situation
huge fustercluck commit because there wasn't really a way to separate out the changes. better to just rip it all out at once.
* compositor and window management completely rewritten. this was the goal for E19, but it pretty much required everything existing to be scrapped since it wasn't optimized, streamlined, or sensible. now instead of having the compositor strapped to the window manager like an outboard motor, it's housed more like an automobile engine.
** various comp structs have been merged into other places (eg. E_Comp_Zone is now just part of E_Zone where applicable), leading to a large deduplication of attributes
** awful E_Comp_Win is totally dead, having been replaced with e_comp_object smart objects which work just like normal canvas objects
** protocol-specific window management and compositor functionality is now kept exclusively in backend files
** e_pixmap api provides generic client finding and rendering api
** screen/xinerama screens are now provided directly by compositor on startup and re-set on change
** e_comp_render_update finally replaced with eina_tiler
** wayland compositor no longer creates X windows
** compositor e_layout removed entirely
* e_container is gone. this was made unnecessary in E18, but I kept it to avoid having too much code churn in one release. its sole purpose was to catch some events and handle window stacking, both of which are now just done by the compositor infra
* e_manager is just for screensaver and keybind stuff now, possibly remove later?
* e_border is gone along with a lot of its api. e_client has replaced it, and e_client has been rewritten completely; some parts may be similar, but the design now relies upon having a functional compositor
** window configuration/focus functions are all removed. all windows are now managed solely with evas_object_X functions on the "frame" member of a client, just as any other canvas object can be managed.
*** do NOT set interceptors on a client's comp_object. seriously.
* startup order rewritten: compositor now starts much earlier, other things just use attrs and members of the compositor
* ecore_x_pointer_xy_get usage replaced with ecore_evas_pointer_xy_get
* e_popup is totally gone, existing usage replaced by e_comp_object_util_add where applicable, otherwise just placed normally on the canvas
* deskmirror is (more) broken for now
* illume is totally fucked
* Ecore_X_Window replaced with Ecore_Window in most cases
* edge binding XWindows replaced with regular canvas objects
* some E_Win functionality has changed such that delete callbacks are now correctly called in ALL cases. various dialogs have been updated to not crash as a result
comp files and descriptions:
e_comp.c - overall compositor functions, rendering/update loop, shape cutting
e_comp_x.c - X window management and compositor functionality
e_comp_wl.c - Wayland surface management and compositor functionality
e_comp_canvas.c - general compositor canvas functions and utilities
e_comp_object.c - E_Client->frame member for managing clients as Evas_Objects, utility functions for adding objects to the compositor rendering systems
additional authors: ivan.briano@intel.com
feature: new compositor
removal: e_border, e_container, e_popup
2014-01-14 17:19:12 -08:00
|
|
|
E_Client *t, *b;
|
2011-01-29 13:08:13 -08:00
|
|
|
int y, h, tpos, bpos;
|
|
|
|
|
|
|
|
if (!swin) return;
|
|
|
|
if (!ecore_x_e_illume_indicator_geometry_get(swin->zone->black_win,
|
|
|
|
NULL, &y, NULL, &h))
|
|
|
|
y = 0;
|
|
|
|
|
|
|
|
if (y > 0)
|
|
|
|
{
|
|
|
|
tpos = 0;
|
|
|
|
bpos = (y + h);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
tpos = (y + h);
|
|
|
|
bpos = (swin->zone->h / 2);
|
|
|
|
}
|
|
|
|
|
|
|
|
t = _e_mod_sft_win_border_get(swin->zone, swin->zone->x, tpos);
|
|
|
|
b = _e_mod_sft_win_border_get(swin->zone, swin->zone->x, bpos);
|
|
|
|
|
compositor rewrite / charlie-foxtrot situation
huge fustercluck commit because there wasn't really a way to separate out the changes. better to just rip it all out at once.
* compositor and window management completely rewritten. this was the goal for E19, but it pretty much required everything existing to be scrapped since it wasn't optimized, streamlined, or sensible. now instead of having the compositor strapped to the window manager like an outboard motor, it's housed more like an automobile engine.
** various comp structs have been merged into other places (eg. E_Comp_Zone is now just part of E_Zone where applicable), leading to a large deduplication of attributes
** awful E_Comp_Win is totally dead, having been replaced with e_comp_object smart objects which work just like normal canvas objects
** protocol-specific window management and compositor functionality is now kept exclusively in backend files
** e_pixmap api provides generic client finding and rendering api
** screen/xinerama screens are now provided directly by compositor on startup and re-set on change
** e_comp_render_update finally replaced with eina_tiler
** wayland compositor no longer creates X windows
** compositor e_layout removed entirely
* e_container is gone. this was made unnecessary in E18, but I kept it to avoid having too much code churn in one release. its sole purpose was to catch some events and handle window stacking, both of which are now just done by the compositor infra
* e_manager is just for screensaver and keybind stuff now, possibly remove later?
* e_border is gone along with a lot of its api. e_client has replaced it, and e_client has been rewritten completely; some parts may be similar, but the design now relies upon having a functional compositor
** window configuration/focus functions are all removed. all windows are now managed solely with evas_object_X functions on the "frame" member of a client, just as any other canvas object can be managed.
*** do NOT set interceptors on a client's comp_object. seriously.
* startup order rewritten: compositor now starts much earlier, other things just use attrs and members of the compositor
* ecore_x_pointer_xy_get usage replaced with ecore_evas_pointer_xy_get
* e_popup is totally gone, existing usage replaced by e_comp_object_util_add where applicable, otherwise just placed normally on the canvas
* deskmirror is (more) broken for now
* illume is totally fucked
* Ecore_X_Window replaced with Ecore_Window in most cases
* edge binding XWindows replaced with regular canvas objects
* some E_Win functionality has changed such that delete callbacks are now correctly called in ALL cases. various dialogs have been updated to not crash as a result
comp files and descriptions:
e_comp.c - overall compositor functions, rendering/update loop, shape cutting
e_comp_x.c - X window management and compositor functionality
e_comp_wl.c - Wayland surface management and compositor functionality
e_comp_canvas.c - general compositor canvas functions and utilities
e_comp_object.c - E_Client->frame member for managing clients as Evas_Objects, utility functions for adding objects to the compositor rendering systems
additional authors: ivan.briano@intel.com
feature: new compositor
removal: e_border, e_container, e_popup
2014-01-14 17:19:12 -08:00
|
|
|
if (t) evas_object_move(t->frame, t->x, bpos);
|
|
|
|
if (b) evas_object_move(b->frame, b->x, tpos);
|
2011-01-29 13:08:13 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
_e_mod_sft_win_pos_toggle_left(Sft_Win *swin)
|
|
|
|
{
|
compositor rewrite / charlie-foxtrot situation
huge fustercluck commit because there wasn't really a way to separate out the changes. better to just rip it all out at once.
* compositor and window management completely rewritten. this was the goal for E19, but it pretty much required everything existing to be scrapped since it wasn't optimized, streamlined, or sensible. now instead of having the compositor strapped to the window manager like an outboard motor, it's housed more like an automobile engine.
** various comp structs have been merged into other places (eg. E_Comp_Zone is now just part of E_Zone where applicable), leading to a large deduplication of attributes
** awful E_Comp_Win is totally dead, having been replaced with e_comp_object smart objects which work just like normal canvas objects
** protocol-specific window management and compositor functionality is now kept exclusively in backend files
** e_pixmap api provides generic client finding and rendering api
** screen/xinerama screens are now provided directly by compositor on startup and re-set on change
** e_comp_render_update finally replaced with eina_tiler
** wayland compositor no longer creates X windows
** compositor e_layout removed entirely
* e_container is gone. this was made unnecessary in E18, but I kept it to avoid having too much code churn in one release. its sole purpose was to catch some events and handle window stacking, both of which are now just done by the compositor infra
* e_manager is just for screensaver and keybind stuff now, possibly remove later?
* e_border is gone along with a lot of its api. e_client has replaced it, and e_client has been rewritten completely; some parts may be similar, but the design now relies upon having a functional compositor
** window configuration/focus functions are all removed. all windows are now managed solely with evas_object_X functions on the "frame" member of a client, just as any other canvas object can be managed.
*** do NOT set interceptors on a client's comp_object. seriously.
* startup order rewritten: compositor now starts much earlier, other things just use attrs and members of the compositor
* ecore_x_pointer_xy_get usage replaced with ecore_evas_pointer_xy_get
* e_popup is totally gone, existing usage replaced by e_comp_object_util_add where applicable, otherwise just placed normally on the canvas
* deskmirror is (more) broken for now
* illume is totally fucked
* Ecore_X_Window replaced with Ecore_Window in most cases
* edge binding XWindows replaced with regular canvas objects
* some E_Win functionality has changed such that delete callbacks are now correctly called in ALL cases. various dialogs have been updated to not crash as a result
comp files and descriptions:
e_comp.c - overall compositor functions, rendering/update loop, shape cutting
e_comp_x.c - X window management and compositor functionality
e_comp_wl.c - Wayland surface management and compositor functionality
e_comp_canvas.c - general compositor canvas functions and utilities
e_comp_object.c - E_Client->frame member for managing clients as Evas_Objects, utility functions for adding objects to the compositor rendering systems
additional authors: ivan.briano@intel.com
feature: new compositor
removal: e_border, e_container, e_popup
2014-01-14 17:19:12 -08:00
|
|
|
E_Client *l, *r;
|
2011-01-29 13:08:13 -08:00
|
|
|
int h, lpos, rpos;
|
|
|
|
|
|
|
|
if (!swin) return;
|
|
|
|
|
|
|
|
if (!ecore_x_e_illume_indicator_geometry_get(swin->zone->black_win,
|
|
|
|
NULL, NULL, NULL, &h))
|
|
|
|
h = 0;
|
|
|
|
|
|
|
|
lpos = 0;
|
|
|
|
rpos = (swin->zone->w / 2);
|
|
|
|
|
|
|
|
l = _e_mod_sft_win_border_get(swin->zone, lpos, h);
|
|
|
|
r = _e_mod_sft_win_border_get(swin->zone, rpos, h);
|
|
|
|
|
compositor rewrite / charlie-foxtrot situation
huge fustercluck commit because there wasn't really a way to separate out the changes. better to just rip it all out at once.
* compositor and window management completely rewritten. this was the goal for E19, but it pretty much required everything existing to be scrapped since it wasn't optimized, streamlined, or sensible. now instead of having the compositor strapped to the window manager like an outboard motor, it's housed more like an automobile engine.
** various comp structs have been merged into other places (eg. E_Comp_Zone is now just part of E_Zone where applicable), leading to a large deduplication of attributes
** awful E_Comp_Win is totally dead, having been replaced with e_comp_object smart objects which work just like normal canvas objects
** protocol-specific window management and compositor functionality is now kept exclusively in backend files
** e_pixmap api provides generic client finding and rendering api
** screen/xinerama screens are now provided directly by compositor on startup and re-set on change
** e_comp_render_update finally replaced with eina_tiler
** wayland compositor no longer creates X windows
** compositor e_layout removed entirely
* e_container is gone. this was made unnecessary in E18, but I kept it to avoid having too much code churn in one release. its sole purpose was to catch some events and handle window stacking, both of which are now just done by the compositor infra
* e_manager is just for screensaver and keybind stuff now, possibly remove later?
* e_border is gone along with a lot of its api. e_client has replaced it, and e_client has been rewritten completely; some parts may be similar, but the design now relies upon having a functional compositor
** window configuration/focus functions are all removed. all windows are now managed solely with evas_object_X functions on the "frame" member of a client, just as any other canvas object can be managed.
*** do NOT set interceptors on a client's comp_object. seriously.
* startup order rewritten: compositor now starts much earlier, other things just use attrs and members of the compositor
* ecore_x_pointer_xy_get usage replaced with ecore_evas_pointer_xy_get
* e_popup is totally gone, existing usage replaced by e_comp_object_util_add where applicable, otherwise just placed normally on the canvas
* deskmirror is (more) broken for now
* illume is totally fucked
* Ecore_X_Window replaced with Ecore_Window in most cases
* edge binding XWindows replaced with regular canvas objects
* some E_Win functionality has changed such that delete callbacks are now correctly called in ALL cases. various dialogs have been updated to not crash as a result
comp files and descriptions:
e_comp.c - overall compositor functions, rendering/update loop, shape cutting
e_comp_x.c - X window management and compositor functionality
e_comp_wl.c - Wayland surface management and compositor functionality
e_comp_canvas.c - general compositor canvas functions and utilities
e_comp_object.c - E_Client->frame member for managing clients as Evas_Objects, utility functions for adding objects to the compositor rendering systems
additional authors: ivan.briano@intel.com
feature: new compositor
removal: e_border, e_container, e_popup
2014-01-14 17:19:12 -08:00
|
|
|
if (l) evas_object_move(l->frame, rpos, l->y);
|
|
|
|
if (r) evas_object_move(r->frame, lpos, r->y);
|
2011-01-29 13:08:13 -08:00
|
|
|
}
|
|
|
|
|
compositor rewrite / charlie-foxtrot situation
huge fustercluck commit because there wasn't really a way to separate out the changes. better to just rip it all out at once.
* compositor and window management completely rewritten. this was the goal for E19, but it pretty much required everything existing to be scrapped since it wasn't optimized, streamlined, or sensible. now instead of having the compositor strapped to the window manager like an outboard motor, it's housed more like an automobile engine.
** various comp structs have been merged into other places (eg. E_Comp_Zone is now just part of E_Zone where applicable), leading to a large deduplication of attributes
** awful E_Comp_Win is totally dead, having been replaced with e_comp_object smart objects which work just like normal canvas objects
** protocol-specific window management and compositor functionality is now kept exclusively in backend files
** e_pixmap api provides generic client finding and rendering api
** screen/xinerama screens are now provided directly by compositor on startup and re-set on change
** e_comp_render_update finally replaced with eina_tiler
** wayland compositor no longer creates X windows
** compositor e_layout removed entirely
* e_container is gone. this was made unnecessary in E18, but I kept it to avoid having too much code churn in one release. its sole purpose was to catch some events and handle window stacking, both of which are now just done by the compositor infra
* e_manager is just for screensaver and keybind stuff now, possibly remove later?
* e_border is gone along with a lot of its api. e_client has replaced it, and e_client has been rewritten completely; some parts may be similar, but the design now relies upon having a functional compositor
** window configuration/focus functions are all removed. all windows are now managed solely with evas_object_X functions on the "frame" member of a client, just as any other canvas object can be managed.
*** do NOT set interceptors on a client's comp_object. seriously.
* startup order rewritten: compositor now starts much earlier, other things just use attrs and members of the compositor
* ecore_x_pointer_xy_get usage replaced with ecore_evas_pointer_xy_get
* e_popup is totally gone, existing usage replaced by e_comp_object_util_add where applicable, otherwise just placed normally on the canvas
* deskmirror is (more) broken for now
* illume is totally fucked
* Ecore_X_Window replaced with Ecore_Window in most cases
* edge binding XWindows replaced with regular canvas objects
* some E_Win functionality has changed such that delete callbacks are now correctly called in ALL cases. various dialogs have been updated to not crash as a result
comp files and descriptions:
e_comp.c - overall compositor functions, rendering/update loop, shape cutting
e_comp_x.c - X window management and compositor functionality
e_comp_wl.c - Wayland surface management and compositor functionality
e_comp_canvas.c - general compositor canvas functions and utilities
e_comp_object.c - E_Client->frame member for managing clients as Evas_Objects, utility functions for adding objects to the compositor rendering systems
additional authors: ivan.briano@intel.com
feature: new compositor
removal: e_border, e_container, e_popup
2014-01-14 17:19:12 -08:00
|
|
|
static E_Client *
|
2011-01-29 13:08:13 -08:00
|
|
|
_e_mod_sft_win_border_get(E_Zone *zone, int x, int y)
|
|
|
|
{
|
|
|
|
Eina_List *l;
|
compositor rewrite / charlie-foxtrot situation
huge fustercluck commit because there wasn't really a way to separate out the changes. better to just rip it all out at once.
* compositor and window management completely rewritten. this was the goal for E19, but it pretty much required everything existing to be scrapped since it wasn't optimized, streamlined, or sensible. now instead of having the compositor strapped to the window manager like an outboard motor, it's housed more like an automobile engine.
** various comp structs have been merged into other places (eg. E_Comp_Zone is now just part of E_Zone where applicable), leading to a large deduplication of attributes
** awful E_Comp_Win is totally dead, having been replaced with e_comp_object smart objects which work just like normal canvas objects
** protocol-specific window management and compositor functionality is now kept exclusively in backend files
** e_pixmap api provides generic client finding and rendering api
** screen/xinerama screens are now provided directly by compositor on startup and re-set on change
** e_comp_render_update finally replaced with eina_tiler
** wayland compositor no longer creates X windows
** compositor e_layout removed entirely
* e_container is gone. this was made unnecessary in E18, but I kept it to avoid having too much code churn in one release. its sole purpose was to catch some events and handle window stacking, both of which are now just done by the compositor infra
* e_manager is just for screensaver and keybind stuff now, possibly remove later?
* e_border is gone along with a lot of its api. e_client has replaced it, and e_client has been rewritten completely; some parts may be similar, but the design now relies upon having a functional compositor
** window configuration/focus functions are all removed. all windows are now managed solely with evas_object_X functions on the "frame" member of a client, just as any other canvas object can be managed.
*** do NOT set interceptors on a client's comp_object. seriously.
* startup order rewritten: compositor now starts much earlier, other things just use attrs and members of the compositor
* ecore_x_pointer_xy_get usage replaced with ecore_evas_pointer_xy_get
* e_popup is totally gone, existing usage replaced by e_comp_object_util_add where applicable, otherwise just placed normally on the canvas
* deskmirror is (more) broken for now
* illume is totally fucked
* Ecore_X_Window replaced with Ecore_Window in most cases
* edge binding XWindows replaced with regular canvas objects
* some E_Win functionality has changed such that delete callbacks are now correctly called in ALL cases. various dialogs have been updated to not crash as a result
comp files and descriptions:
e_comp.c - overall compositor functions, rendering/update loop, shape cutting
e_comp_x.c - X window management and compositor functionality
e_comp_wl.c - Wayland surface management and compositor functionality
e_comp_canvas.c - general compositor canvas functions and utilities
e_comp_object.c - E_Client->frame member for managing clients as Evas_Objects, utility functions for adding objects to the compositor rendering systems
additional authors: ivan.briano@intel.com
feature: new compositor
removal: e_border, e_container, e_popup
2014-01-14 17:19:12 -08:00
|
|
|
E_Client *ec;
|
2011-01-29 13:08:13 -08:00
|
|
|
|
|
|
|
if (!zone) return NULL;
|
2015-03-13 14:44:24 -07:00
|
|
|
EINA_LIST_REVERSE_FOREACH(e_comp->clients, l, ec)
|
2011-01-29 13:08:13 -08:00
|
|
|
{
|
compositor rewrite / charlie-foxtrot situation
huge fustercluck commit because there wasn't really a way to separate out the changes. better to just rip it all out at once.
* compositor and window management completely rewritten. this was the goal for E19, but it pretty much required everything existing to be scrapped since it wasn't optimized, streamlined, or sensible. now instead of having the compositor strapped to the window manager like an outboard motor, it's housed more like an automobile engine.
** various comp structs have been merged into other places (eg. E_Comp_Zone is now just part of E_Zone where applicable), leading to a large deduplication of attributes
** awful E_Comp_Win is totally dead, having been replaced with e_comp_object smart objects which work just like normal canvas objects
** protocol-specific window management and compositor functionality is now kept exclusively in backend files
** e_pixmap api provides generic client finding and rendering api
** screen/xinerama screens are now provided directly by compositor on startup and re-set on change
** e_comp_render_update finally replaced with eina_tiler
** wayland compositor no longer creates X windows
** compositor e_layout removed entirely
* e_container is gone. this was made unnecessary in E18, but I kept it to avoid having too much code churn in one release. its sole purpose was to catch some events and handle window stacking, both of which are now just done by the compositor infra
* e_manager is just for screensaver and keybind stuff now, possibly remove later?
* e_border is gone along with a lot of its api. e_client has replaced it, and e_client has been rewritten completely; some parts may be similar, but the design now relies upon having a functional compositor
** window configuration/focus functions are all removed. all windows are now managed solely with evas_object_X functions on the "frame" member of a client, just as any other canvas object can be managed.
*** do NOT set interceptors on a client's comp_object. seriously.
* startup order rewritten: compositor now starts much earlier, other things just use attrs and members of the compositor
* ecore_x_pointer_xy_get usage replaced with ecore_evas_pointer_xy_get
* e_popup is totally gone, existing usage replaced by e_comp_object_util_add where applicable, otherwise just placed normally on the canvas
* deskmirror is (more) broken for now
* illume is totally fucked
* Ecore_X_Window replaced with Ecore_Window in most cases
* edge binding XWindows replaced with regular canvas objects
* some E_Win functionality has changed such that delete callbacks are now correctly called in ALL cases. various dialogs have been updated to not crash as a result
comp files and descriptions:
e_comp.c - overall compositor functions, rendering/update loop, shape cutting
e_comp_x.c - X window management and compositor functionality
e_comp_wl.c - Wayland surface management and compositor functionality
e_comp_canvas.c - general compositor canvas functions and utilities
e_comp_object.c - E_Client->frame member for managing clients as Evas_Objects, utility functions for adding objects to the compositor rendering systems
additional authors: ivan.briano@intel.com
feature: new compositor
removal: e_border, e_container, e_popup
2014-01-14 17:19:12 -08:00
|
|
|
if (e_client_util_ignored_get(ec)) continue;
|
|
|
|
if (ec->zone != zone) continue;
|
|
|
|
if (!ec->visible) continue;
|
|
|
|
if ((ec->x != x) || (ec->y != y)) continue;
|
|
|
|
if (ec->illume.quickpanel.quickpanel) continue;
|
2011-01-29 13:08:13 -08:00
|
|
|
|
compositor rewrite / charlie-foxtrot situation
huge fustercluck commit because there wasn't really a way to separate out the changes. better to just rip it all out at once.
* compositor and window management completely rewritten. this was the goal for E19, but it pretty much required everything existing to be scrapped since it wasn't optimized, streamlined, or sensible. now instead of having the compositor strapped to the window manager like an outboard motor, it's housed more like an automobile engine.
** various comp structs have been merged into other places (eg. E_Comp_Zone is now just part of E_Zone where applicable), leading to a large deduplication of attributes
** awful E_Comp_Win is totally dead, having been replaced with e_comp_object smart objects which work just like normal canvas objects
** protocol-specific window management and compositor functionality is now kept exclusively in backend files
** e_pixmap api provides generic client finding and rendering api
** screen/xinerama screens are now provided directly by compositor on startup and re-set on change
** e_comp_render_update finally replaced with eina_tiler
** wayland compositor no longer creates X windows
** compositor e_layout removed entirely
* e_container is gone. this was made unnecessary in E18, but I kept it to avoid having too much code churn in one release. its sole purpose was to catch some events and handle window stacking, both of which are now just done by the compositor infra
* e_manager is just for screensaver and keybind stuff now, possibly remove later?
* e_border is gone along with a lot of its api. e_client has replaced it, and e_client has been rewritten completely; some parts may be similar, but the design now relies upon having a functional compositor
** window configuration/focus functions are all removed. all windows are now managed solely with evas_object_X functions on the "frame" member of a client, just as any other canvas object can be managed.
*** do NOT set interceptors on a client's comp_object. seriously.
* startup order rewritten: compositor now starts much earlier, other things just use attrs and members of the compositor
* ecore_x_pointer_xy_get usage replaced with ecore_evas_pointer_xy_get
* e_popup is totally gone, existing usage replaced by e_comp_object_util_add where applicable, otherwise just placed normally on the canvas
* deskmirror is (more) broken for now
* illume is totally fucked
* Ecore_X_Window replaced with Ecore_Window in most cases
* edge binding XWindows replaced with regular canvas objects
* some E_Win functionality has changed such that delete callbacks are now correctly called in ALL cases. various dialogs have been updated to not crash as a result
comp files and descriptions:
e_comp.c - overall compositor functions, rendering/update loop, shape cutting
e_comp_x.c - X window management and compositor functionality
e_comp_wl.c - Wayland surface management and compositor functionality
e_comp_canvas.c - general compositor canvas functions and utilities
e_comp_object.c - E_Client->frame member for managing clients as Evas_Objects, utility functions for adding objects to the compositor rendering systems
additional authors: ivan.briano@intel.com
feature: new compositor
removal: e_border, e_container, e_popup
2014-01-14 17:19:12 -08:00
|
|
|
return ec;
|
2011-01-29 13:08:13 -08:00
|
|
|
}
|
|
|
|
return NULL;
|
|
|
|
}
|