e-modules/engage: fix bug with fullscreen autohide affecting both screens.

- and use ecore_x_shape functons


SVN revision: 61291
This commit is contained in:
Hannes Janetzek 2011-07-12 13:09:15 +00:00
parent 4b7f0261ba
commit 7ba41ff055
2 changed files with 11 additions and 10 deletions

View File

@ -1,5 +1,4 @@
#include "e_mod_main.h" #include "e_mod_main.h"
#include <X11/extensions/shape.h>
#define WINDOW_HEIGHT 250 #define WINDOW_HEIGHT 250
#define TEXT_DIST 45 #define TEXT_DIST 45
@ -487,9 +486,7 @@ ngi_input_extents_calc(Ng *ng)
if (ngi_config->use_composite) if (ngi_config->use_composite)
{ {
XShapeCombineRectangles((Display *)ecore_x_display_get(), ecore_x_window_shape_input_rectangles_set(win->input, &win->rect, 1);
win->input, ShapeInput, 0, 0,
&win->rect, 1, ShapeSet, Unsorted);
} }
else else
{ {
@ -501,10 +498,11 @@ ngi_input_extents_calc(Ng *ng)
EINA_LIST_FOREACH (ng->boxes, l, box) EINA_LIST_FOREACH (ng->boxes, l, box)
{ {
int w = box->w;
if (!box->drop_handler) if (!box->drop_handler)
continue; continue;
int w = box->w;
if (w < 10) w = 10; if (w < 10) w = 10;
switch (ng->cfg->orient) switch (ng->cfg->orient)
@ -1502,7 +1500,7 @@ _ngi_redraw(Ng *ng)
EINA_LIST_FOREACH (box->items, l, it) EINA_LIST_FOREACH (box->items, l, it)
{ {
double size; double size;
if (it->scale == 0.0) if (it->scale == 0.0)
continue; continue;
@ -1521,13 +1519,12 @@ _ngi_redraw(Ng *ng)
if (pos2 > ng->pos) if (pos2 > ng->pos)
{ {
/* pos2 += 0.5; */
size = (int)(pos2 - (pos - 0.5)); size = (int)(pos2 - (pos - 0.5));
pos += 0.5; pos += 0.5;
} }
else else
size = (int)(pos2 - pos); size = (int)(pos2 - pos);
switch (cfg->orient) switch (cfg->orient)
{ {
case E_GADCON_ORIENT_BOTTOM: case E_GADCON_ORIENT_BOTTOM:
@ -1565,7 +1562,8 @@ _ngi_redraw(Ng *ng)
void void
ngi_bar_lock(Ng *ng, int show) ngi_bar_lock(Ng *ng, int show)
{ {
if (!ng) return;
if (show) if (show)
{ {
ng->show_bar++; ng->show_bar++;
@ -1667,6 +1665,9 @@ static void
_ngi_win_autohide_check(Ng *ng, E_Desk *desk) _ngi_win_autohide_check(Ng *ng, E_Desk *desk)
{ {
int hide; int hide;
if (desk->zone != ng->zone)
return;
if (ng->cfg->stacking == below_fullscreen) if (ng->cfg->stacking == below_fullscreen)
{ {

View File

@ -118,7 +118,7 @@ struct _Ngi_Win
Ng *ng; Ng *ng;
E_Popup *popup; E_Popup *popup;
Ecore_X_Window input; Ecore_X_Window input;
XRectangle rect; Ecore_X_Rectangle rect;
E_Win *fake_iwin; E_Win *fake_iwin;
E_Object *drop_win; E_Object *drop_win;
}; };