diff options
Diffstat (limited to 'generic/Window.c')
-rw-r--r-- | generic/Window.c | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/generic/Window.c b/generic/Window.c index a380026..063b446 100644 --- a/generic/Window.c +++ b/generic/Window.c @@ -63,6 +63,9 @@ typedef struct _WindowItemStruct { static ZnAttrConfig wind_attrs[] = { { ZN_CONFIG_ANCHOR, "-anchor", NULL, Tk_Offset(WindowItemStruct, anchor), 0, ZN_COORDS_FLAG, False }, + { ZN_CONFIG_BOOL, "-composealpha", NULL, + Tk_Offset(WindowItemStruct, header.flags), COMPOSE_ALPHA_BIT, + ZN_DRAW_FLAG, False }, { ZN_CONFIG_BOOL, "-composerotation", NULL, Tk_Offset(WindowItemStruct, header.flags), COMPOSE_ROTATION_BIT, ZN_COORDS_FLAG, False }, @@ -84,7 +87,7 @@ static ZnAttrConfig wind_attrs[] = { { ZN_CONFIG_BOOL, "-sensitive", NULL, Tk_Offset(WindowItemStruct, header.flags), SENSITIVE_BIT, ZN_REPICK_FLAG, False }, - { ZN_CONFIG_TAGS, "-tags", NULL, + { ZN_CONFIG_TAG_LIST, "-tags", NULL, Tk_Offset(WindowItemStruct, header.tags), 0, 0, False }, { ZN_CONFIG_BOOL, "-visible", NULL, Tk_Offset(WindowItemStruct, header.flags), VISIBLE_BIT, @@ -184,6 +187,7 @@ Init(Item item, /* Init attributes */ SET(item->flags, VISIBLE_BIT); SET(item->flags, SENSITIVE_BIT); + SET(item->flags, COMPOSE_ALPHA_BIT); /* N.A */ SET(item->flags, COMPOSE_ROTATION_BIT); SET(item->flags, COMPOSE_SCALE_BIT); item->priority = DEFAULT_WINDOW_PRIORITY; /* N.A */ @@ -411,10 +415,7 @@ ComputeCoordinates(Item item, */ static int ToArea(Item item, - ZnBBox *area, - Tk_Uid tag_uid, - int enclosed, - ZnBool report) + ZnToArea ta) { WindowItem wind = (WindowItem) item; ZnBBox box; @@ -428,7 +429,7 @@ ToArea(Item item, box.corner.x = box.orig.x + w; box.corner.y = box.orig.y + h; - return BBoxInBBox(&box, area); + return BBoxInBBox(&box, ta->area); } /* @@ -514,16 +515,13 @@ IsSensitive(Item item, */ static double Pick(Item item, - ZnPoint *p, - Item start_item, - int aperture, - Item *a_item, - int *part) + ZnPick ps) { WindowItem wind = (WindowItem) item; ZnBBox box; ZnReal dist = 1e40; - + ZnPoint *p = ps->point; + box.orig = wind->pos_dev; if (wind->win != NULL) { box.corner.x = box.orig.x + wind->real_width; @@ -657,7 +655,6 @@ Coords(Item item, */ static ItemClassStruct WINDOW_ITEM_CLASS = { sizeof(WindowItemStruct), - False, /* has_fields */ 0, /* num_parts */ True, /* has_anchors */ "window", |