mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-23 22:52:34 +01:00
Omnipresent appicon mark
This commit is contained in:
@@ -317,6 +317,34 @@ drawCorner(WIcon *icon, WWindow *wwin, int active)
|
||||
#endif /* NEWAPPICON */
|
||||
|
||||
|
||||
static void
|
||||
drawCorner(WIcon *icon)
|
||||
{
|
||||
WScreen *scr = icon->core->screen_ptr;
|
||||
XPoint points[3];
|
||||
|
||||
points[0].x = 1;
|
||||
points[0].y = 1;
|
||||
points[1].x = 12;
|
||||
points[1].y = 1;
|
||||
points[2].x = 1;
|
||||
points[2].y = 12;
|
||||
XFillPolygon(dpy, icon->core->window, scr->icon_title_texture->normal_gc,
|
||||
points, 3, Convex, CoordModeOrigin);
|
||||
XDrawLine(dpy, icon->core->window, scr->icon_title_texture->light_gc,
|
||||
0, 0, 0, 12);
|
||||
XDrawLine(dpy, icon->core->window, scr->icon_title_texture->light_gc,
|
||||
0, 0, 12, 0);
|
||||
/* drawing the second line gives a weird concave look. -Dan */
|
||||
#if 0
|
||||
XDrawLine(dpy, icon->core->window, scr->icon_title_texture->light_gc,
|
||||
1, 1, 1, 11);
|
||||
XDrawLine(dpy, icon->core->window, scr->icon_title_texture->light_gc,
|
||||
1, 1, 11, 1);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
wAppIconMove(WAppIcon *aicon, int x, int y)
|
||||
{
|
||||
@@ -423,6 +451,9 @@ wAppIconPaint(WAppIcon *aicon)
|
||||
}
|
||||
#endif /* NEWAPPICON */
|
||||
|
||||
if (aicon->omnipresent)
|
||||
drawCorner(aicon->icon);
|
||||
|
||||
XSetClipMask(dpy, scr->copy_gc, None);
|
||||
if (aicon->launching) {
|
||||
XFillRectangle(dpy, aicon->icon->core->window, scr->stipple_gc,
|
||||
|
||||
@@ -4042,11 +4042,9 @@ iconMouseDown(WObjDescriptor *desc, XEvent *event)
|
||||
event->xany.send_event = True;
|
||||
(*desc->handle_mousedown)(desc, event);
|
||||
}
|
||||
#if 1
|
||||
} else if (event->xbutton.button==Button2 && dock->type==WM_CLIP &&
|
||||
(event->xbutton.state & ShiftMask) && aicon!=scr->clip_icon) {
|
||||
wClipMakeIconOmnipresent(aicon, !aicon->omnipresent);
|
||||
#endif
|
||||
} else if (event->xbutton.button == Button3) {
|
||||
openDockMenu(dock, aicon, event);
|
||||
}
|
||||
@@ -4361,6 +4359,8 @@ wClipMakeIconOmnipresent(WAppIcon *aicon, int omnipresent)
|
||||
}
|
||||
}
|
||||
|
||||
wAppIconPaint(aicon);
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user