On 09/05/13 17:53, Rafael Antognolli wrote: > On Thu, Sep 5, 2013 at 10:59 AM, Chris Michael <devilho...@comcast.net> wrote: >> On 09/04/13 19:13, Rafael Antognolli wrote: >>> Hi dh, >>> >>> Is this done because of the "black spacer" that you mention in Ecore's >>> commit? If so, that's fixed there already, do we still need this fix >>> in elementary too? >> >> How is it fixed there already ?? Did some magical, invisible thing get added >> to trac the space used by "spacer" in the dark theme ?? >> >> Yes, this is needed in elementary...because I don't see the magic fix you >> are referring to ;) > nvm, I didn't know what black area you were trying to fix here. I > thought just setting alpha to always true would already fix this, I > forgot about the opaque region stuff. > No Worries :)
>> + >> +#ifdef HAVE_ELEMENTARY_WAYLAND >> + ecore_wl_window_opaque_region_set(sd->wl.win, -fx, -sy, sw, sh); >> +#endif >> >> I think there's a mistake on the lines above, you are using -fx, -sy. >> Shouldn't it be -sx, -sy? >> >> No, that's not a mistake. The spacer object always is returning 0 for a X >> position. If we set the opaque region to be 0, then we have a black bar on >> the left of the client. Framespace X (typically) starts at -7 in my tests. >> Hence, this will start the opaque region at 7 (ie: the start of the left >> side of the frame). > OK, that makes sense, but then why isn't it using -fy too, instead of > -sy? The same logic should apply, shouldn't it? If it doesn't, then I > fail to understand why. If we used fy here, then the opaque region would end up being defined (on a Y axis) Below the titlebar of the frame (ie: -7 -24 14 40). So if I set this to -fy, then opaque region would Not include the top of the frame :) >> It's proper. Been tested :) Tho this Does break things wrt evas_map >> rendering Outside the frame but I have not yet looked into that. > I'm sure you have tested it. I just want to be sure that you didn't > add a fix only for the dark theme. That it will allow other themes, > with different offsets for the spacer and frame, to also work. Well, dark theme is the one I am working with. If other themes also have a spacer and the proper swallow parts defined (which they will need to do), then it will work for them also :) dh > > Using different variables calculations for x and y, when everything > else was done exactly the same, smells like a little hack, unless I > didn't get the exact reason for using that. > >>> BTW, look at the comment below... >>> >>> On Wed, Sep 4, 2013 at 10:38 AM, Chris Michael - Enlightenment Git >>> <no-re...@enlightenment.org> wrote: >>>> devilhorns pushed a commit to branch master. >>>> >>>> commit 2644ba383e1ac4196f62af7ad9c6bb288fe3b587 >>>> Author: Chris Michael <cp.mich...@samsung.com> >>>> Date: Wed Sep 4 14:22:44 2013 +0100 >>>> >>>> Add a rectangle to trac frame "spacer" so we can set opaque_region >>>> properly. >>>> >>>> Signed-off-by: Chris Michael <cp.mich...@samsung.com> >>>> --- >>>> src/lib/elm_win.c | 19 +++++++++++++++++++ >>>> 1 file changed, 19 insertions(+) >>>> >>>> diff --git a/src/lib/elm_win.c b/src/lib/elm_win.c >>>> index c601b2f..1a91f05 100644 >>>> --- a/src/lib/elm_win.c >>>> +++ b/src/lib/elm_win.c >>>> @@ -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 >>> I think there's a mistake on the lines above, you are using -fx, -sy. >>> Shouldn't it be -sx, -sy? >>> >>>> 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); >>> Same problem here. >>> >>>> +#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 */ >>>> > > ------------------------------------------------------------------------------ Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more! Discover the easy way to master current and previous Microsoft technologies and advance your career. Get an incredible 1,500+ hours of step-by-step tutorial videos with LearnDevNow. Subscribe today and save! http://pubads.g.doubleclick.net/gampad/clk?id=58041391&iu=/4140/ostg.clktrk _______________________________________________ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel