diff options
author | Gwanglim Lee <gl77.lee@samsung.com> | 2011-12-30 02:15:02 +0000 |
---|---|---|
committer | Carsten Haitzler <raster@rasterman.com> | 2011-12-30 02:15:02 +0000 |
commit | 990a6ef050602adc6d6838cb9f5b0d22729dfa1d (patch) | |
tree | 0275483af18d9cb362cab0db52c5ab8e902c2fd4 /src/modules/comp/e_mod_comp.c | |
parent | 14f07bd73da4d37a717ddd56bba56f3aec4184bb (diff) | |
download | enlightenment-990a6ef050602adc6d6838cb9f5b0d22729dfa1d.tar.gz enlightenment-990a6ef050602adc6d6838cb9f5b0d22729dfa1d.tar.xz enlightenment-990a6ef050602adc6d6838cb9f5b0d22729dfa1d.zip |
From: Gwanglim Lee <gl77.lee@samsung.com>
Subject: [E-devel] [Patch] E17/comp: add _NET_WM_CM_Sn checking code
I've added checking code to detect another compositor that is already
running.
And I've also removed unnecessory set/unset code for _NET_WM_CM_S#.
SVN revision: 66657
Diffstat (limited to 'src/modules/comp/e_mod_comp.c')
-rw-r--r-- | src/modules/comp/e_mod_comp.c | 34 |
1 files changed, 21 insertions, 13 deletions
diff --git a/src/modules/comp/e_mod_comp.c b/src/modules/comp/e_mod_comp.c index 576702bdd..b0b4c470c 100644 --- a/src/modules/comp/e_mod_comp.c +++ b/src/modules/comp/e_mod_comp.c @@ -3164,10 +3164,30 @@ _e_mod_comp_add(E_Manager *man) E_Comp *c; Ecore_X_Window *wins; Ecore_X_Window_Attributes att; + Eina_Bool res; int i, num; c = calloc(1, sizeof(E_Comp)); if (!c) return NULL; + + res = ecore_x_screen_is_composited(man->num); + if (res) + { + e_util_dialog_internal + (_("Compositor Error"), + _("Another compositor is already running<br>" + "on your screen.")); + free(c); + return NULL; + } + + c->cm_selection = ecore_x_window_input_new(man->root, 0, 0, 1, 1); + if (!c->cm_selection) + { + free(c); + return NULL; + } + ecore_x_screen_is_composited_set(man->num, c->cm_selection); ecore_x_e_comp_sync_supported_set(man->root, _comp_mod->conf->efl_sync); @@ -3199,16 +3219,6 @@ _e_mod_comp_add(E_Manager *man) return NULL; } - /* FIXME check if already composited? */ - c->cm_selection = ecore_x_window_input_new(man->root, 0, 0, 1, 1); - if (!c->cm_selection) - { - ecore_x_composite_render_window_disable(c->win); - free(c); - return NULL; - } - ecore_x_screen_is_composited_set(c->man->num, c->cm_selection); - if (c->man->num == 0) e_alert_composite_win = c->win; if (_comp_mod->conf->engine == ENGINE_GL) @@ -3264,7 +3274,6 @@ _e_mod_comp_add(E_Manager *man) ecore_evas_show(c->ee); c->ee_win = ecore_evas_window_get(c->ee); - ecore_x_screen_is_composited_set(c->man->num, c->ee_win); ecore_x_composite_redirect_subwindows (c->man->root, ECORE_X_COMPOSITE_UPDATE_MANUAL); @@ -3365,7 +3374,6 @@ _e_mod_comp_del(E_Comp *c) c->grabbed = 0; ecore_x_ungrab(); } - ecore_x_screen_is_composited_set(c->man->num, 0); while (c->wins) { cw = (E_Comp_Win *)(c->wins); @@ -3390,8 +3398,8 @@ _e_mod_comp_del(E_Comp *c) if (c->wins_list) eina_list_free(c->wins_list); ecore_x_window_free(c->cm_selection); - ecore_x_screen_is_composited_set(c->man->num, 0); ecore_x_e_comp_sync_supported_set(c->man->root, 0); + ecore_x_screen_is_composited_set(c->man->num, 0); free(c); } |