mirror of
https://github.com/zoriya/dwm.git
synced 2025-12-05 23:06:19 +00:00
.
This commit is contained in:
3
dwm.c
3
dwm.c
@@ -107,7 +107,7 @@ enum { CurNormal, CurResize, CurMove, CurLast }; /* cursor */
|
||||
enum { SchemeNorm, SchemeSel, SchemeUrg }; /* color schemes */
|
||||
enum { NetSupported, NetWMName, NetWMState, NetWMCheck,
|
||||
NetWMFullscreen, NetActiveWindow, NetWMWindowType,
|
||||
NetSystemTray, NetSystemTrayOP, NetSystemTrayOrientation,
|
||||
NetSystemTray, NetSystemTrayOP, NetSystemTrayOrientation, NetWmStateSkipTaskbar,
|
||||
NetSystemTrayVisual, NetWMWindowTypeDock, NetSystemTrayOrientationHorz,
|
||||
NetDesktopNames, NetDesktopViewport, NetNumberOfDesktops, NetCurrentDesktop,
|
||||
NetClientListStacking,
|
||||
@@ -2525,6 +2525,7 @@ setup(void)
|
||||
netatom[NetSystemTrayOrientation] = XInternAtom(dpy, "_NET_SYSTEM_TRAY_ORIENTATION", False);
|
||||
netatom[NetSystemTrayOrientationHorz] = XInternAtom(dpy, "_NET_SYSTEM_TRAY_ORIENTATION_HORZ", False);
|
||||
netatom[NetSystemTrayVisual] = XInternAtom(dpy, "_NET_SYSTEM_TRAY_VISUAL", False);
|
||||
netatom[NetWmStateSkipTaskbar] = XInternAtom(dpy, "_NET_WM_STATE_SKIP_TASKBAR", False);
|
||||
netatom[NetWMWindowTypeDock] = XInternAtom(dpy, "_NET_WM_WINDOW_TYPE_DOCK", False);
|
||||
xatom[Manager] = XInternAtom(dpy, "MANAGER", False);
|
||||
xatom[Xembed] = XInternAtom(dpy, "_XEMBED", False);
|
||||
|
||||
@@ -6,10 +6,16 @@ width_systray(Bar *bar, BarWidthArg *a)
|
||||
{
|
||||
unsigned int w = 0;
|
||||
Client *i;
|
||||
Atom flags;
|
||||
|
||||
if (!systray)
|
||||
return 1;
|
||||
if (showsystray)
|
||||
for (i = systray->icons; i; w += i->w + systrayspacing, i = i->next);
|
||||
if (showsystray) {
|
||||
for (i = systray->icons; i; i = i->next) {
|
||||
if (!(flags = getatomprop(i, netatom[NetWmStateSkipTaskbar])))
|
||||
w += i->w + systrayspacing;
|
||||
}
|
||||
}
|
||||
return w ? w + lrpad - systrayspacing : 0;
|
||||
}
|
||||
|
||||
@@ -25,6 +31,7 @@ draw_systray(Bar *bar, BarDrawArg *a)
|
||||
XSetWindowAttributes wa;
|
||||
Client *i;
|
||||
unsigned int w;
|
||||
Atom flags;
|
||||
|
||||
if (!systray) {
|
||||
/* init systray */
|
||||
@@ -72,6 +79,8 @@ draw_systray(Bar *bar, BarDrawArg *a)
|
||||
|
||||
drw_setscheme(drw, scheme[SchemeNorm]);
|
||||
for (w = 0, i = systray->icons; i; i = i->next) {
|
||||
if ((flags = getatomprop(i, netatom[NetWmStateSkipTaskbar])))
|
||||
continue;
|
||||
#if BAR_ALPHA_PATCH
|
||||
wa.background_pixel = 0;
|
||||
#else
|
||||
|
||||
Reference in New Issue
Block a user