mirror of
https://github.com/gryf/wmaker.git
synced 2026-01-03 12:24:17 +01:00
AppIcon helper functions.
Create wAppIconFor() and wAppIconTouchesHead() to match wWindowFor() and wWindowTouchesHead(). These functions will allow us to locate the window and head associated with a particular app icon or dock icon.
This commit is contained in:
committed by
Carlos R. Mafra
parent
930e59dd31
commit
67f73e9d54
@@ -201,6 +201,25 @@ Bool wWindowTouchesHead(WWindow * wwin, int head)
|
||||
return (a != 0);
|
||||
}
|
||||
|
||||
Bool wAppIconTouchesHead(WAppIcon * aicon, int head)
|
||||
{
|
||||
WScreen *scr;
|
||||
WMRect rect;
|
||||
int a;
|
||||
|
||||
if (!aicon || !aicon->icon)
|
||||
return False;
|
||||
|
||||
scr = aicon->icon->core->screen_ptr;
|
||||
rect = wGetRectForHead(scr, head);
|
||||
a = calcIntersectionArea(aicon->x_pos, aicon->y_pos,
|
||||
aicon->icon->core->width,
|
||||
aicon->icon->core->height,
|
||||
rect.pos.x, rect.pos.y, rect.size.width, rect.size.height);
|
||||
|
||||
return (a != 0);
|
||||
}
|
||||
|
||||
int wGetHeadForWindow(WWindow * wwin)
|
||||
{
|
||||
WMRect rect;
|
||||
|
||||
Reference in New Issue
Block a user