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