forked from enlightenment/efl
Add a rectangle to trac frame "spacer" so we can set opaque_region
properly. Signed-off-by: Chris Michael <cp.michael@samsung.com>
This commit is contained in:
parent
4d23309024
commit
328b0be7f5
|
@ -64,6 +64,7 @@ struct _Elm_Win_Smart_Data
|
|||
Evas_Object *parent; /* parent *window* object*/
|
||||
Evas_Object *img_obj, *frame_obj;
|
||||
Evas_Object *client_obj; /* rect representing the client */
|
||||
Evas_Object *spacer_obj;
|
||||
Eo *layout;
|
||||
Eo *box;
|
||||
Evas_Object *obj; /* The object itself */
|
||||
|
@ -2209,6 +2210,7 @@ _elm_win_frame_obj_move(void *data,
|
|||
Elm_Win_Smart_Data *sd;
|
||||
int fx, fy, fw, fh;
|
||||
int ox, oy, ow, oh;
|
||||
int sx, sy, sw, sh;
|
||||
int x, y, w, h;
|
||||
|
||||
if (!(sd = data)) return;
|
||||
|
@ -2216,6 +2218,7 @@ _elm_win_frame_obj_move(void *data,
|
|||
|
||||
evas_object_geometry_get(sd->frame_obj, &fx, &fy, &fw, &fh);
|
||||
evas_object_geometry_get(sd->client_obj, &ox, &oy, &ow, &oh);
|
||||
evas_object_geometry_get(sd->spacer_obj, &sx, &sy, &sw, &sh);
|
||||
|
||||
evas_output_framespace_get(sd->evas, &x, &y, &w, &h);
|
||||
if ((x != (ox - fx)) || (y != (oy - fy)) ||
|
||||
|
@ -2224,6 +2227,10 @@ _elm_win_frame_obj_move(void *data,
|
|||
evas_output_framespace_set(sd->evas, (ox - fx), (oy - fy),
|
||||
(fw - ow), (fh - oh));
|
||||
}
|
||||
|
||||
#ifdef HAVE_ELEMENTARY_WAYLAND
|
||||
ecore_wl_window_opaque_region_set(sd->wl.win, -fx, -sy, sw, sh);
|
||||
#endif
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -2235,6 +2242,7 @@ _elm_win_frame_obj_resize(void *data,
|
|||
Elm_Win_Smart_Data *sd;
|
||||
int fx, fy, fw, fh;
|
||||
int ox, oy, ow, oh;
|
||||
int sx, sy, sw, sh;
|
||||
int x, y, w, h;
|
||||
|
||||
if (!(sd = data)) return;
|
||||
|
@ -2242,6 +2250,7 @@ _elm_win_frame_obj_resize(void *data,
|
|||
|
||||
evas_object_geometry_get(sd->frame_obj, &fx, &fy, &fw, &fh);
|
||||
evas_object_geometry_get(sd->client_obj, &ox, &oy, &ow, &oh);
|
||||
evas_object_geometry_get(sd->spacer_obj, &sx, &sy, &sw, &sh);
|
||||
|
||||
evas_output_framespace_get(sd->evas, &x, &y, &w, &h);
|
||||
if ((x != (ox - fx)) || (y != (oy - fy)) ||
|
||||
|
@ -2250,6 +2259,10 @@ _elm_win_frame_obj_resize(void *data,
|
|||
evas_output_framespace_set(sd->evas, (ox - fx), (oy - fy),
|
||||
(fw - ow), (fh - oh));
|
||||
}
|
||||
|
||||
#ifdef HAVE_ELEMENTARY_WAYLAND
|
||||
ecore_wl_window_opaque_region_set(sd->wl.win, -fx, -sy, sw, sh);
|
||||
#endif
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -2437,6 +2450,12 @@ _elm_win_frame_add(Elm_Win_Smart_Data *sd,
|
|||
return;
|
||||
}
|
||||
|
||||
sd->spacer_obj = evas_object_rectangle_add(sd->evas);
|
||||
evas_object_color_set(sd->spacer_obj, 0, 0, 0, 0);
|
||||
evas_object_repeat_events_set(sd->spacer_obj, EINA_TRUE);
|
||||
edje_object_part_swallow(sd->frame_obj, "elm.swallow.frame_spacer",
|
||||
sd->spacer_obj);
|
||||
|
||||
sd->client_obj = evas_object_rectangle_add(sd->evas);
|
||||
evas_object_color_set(sd->client_obj, 0, 0, 0, 0);
|
||||
/* NB: Tried pass_events here, but that fails to send events */
|
||||
|
|
Loading…
Reference in New Issue