macOS-style polish: fix seam, bidirectional Alt+Tab, minimized windows in switcher, rounded corners, deskbar context menu
Fix #1: Replace hardcoded 185px deskbar-offset in client.c and events.c with DESKBAR_W constant (200) to eliminate the 15px gap between the WM frame and deskbar edge. Fix #2: Add Shift+Alt+Tab reverse-direction support — grab Mod1+Shift+XK_Tab in wm.c, detect ShiftMask in events.c, and implement switcher_prev() in switcher.c. Fix #3: Include minimized windows in the Alt+Tab switcher. swl_populate() no longer skips minimized clients; swl_mini[] tracks state so switcher_draw() can dim them with bracketed titles and darker card backgrounds. Fix #4: Rewrite themes/picom.conf with macOS-inspired settings — 10px corner radius on normal windows, 8px on menus, soft downward shadow (radius 18, offset-y 8, opacity 0.35), smooth fading (step 0.08), no dock/tray rounding. Fix #5: Add per-app right-click context menu to the deskbar. Right-clicking an app row opens a popup with Raise / Minimize / Close actions (Close shown in red). Actions are sent as EWMH client messages (_NET_ACTIVE_WINDOW, WM_CHANGE_STATE+IconicState, _NET_CLOSE_WINDOW) with matching handlers added to the WM's on_client_message. Pointer grab closes the menu on any outside click.
This commit is contained in:
8 files changed
+311
-42
No files matched your search
+5
-5
@@ -65,9 +65,9 @@ Client *client_add(WM *wm, Window win) {
|
||||
c->x = wa.x;
|
||||
c->y = wa.y;
|
||||
}
|
||||
/* never land behind deskbar (top-right panel ~180px wide) */
|
||||
/* never land behind deskbar */
|
||||
int sw = DisplayWidth(wm->dpy, wm->screen);
|
||||
if (c->x + (int)c->w > sw - 185 && c->y < 200)
|
||||
if (c->x + (int)c->w > sw - DESKBAR_W && c->y < 200)
|
||||
c->y = 40;
|
||||
|
||||
/* fetch title */
|
||||
@@ -228,7 +228,7 @@ void client_maximize(WM *wm, Client *c) {
|
||||
int sh = DisplayHeight(wm->dpy, wm->screen);
|
||||
|
||||
/* leave room for deskbar on the right */
|
||||
int deskbar_w = 185;
|
||||
int deskbar_w = DESKBAR_W;
|
||||
int new_w = sw - deskbar_w - BORDER_W * 2;
|
||||
int new_h = sh - TITLE_HEIGHT - BORDER_W;
|
||||
|
||||
@@ -280,7 +280,7 @@ void client_snap_left(WM *wm, Client *c) {
|
||||
if (c->maximized) client_unmaximize(wm, c);
|
||||
int sw = DisplayWidth(wm->dpy, wm->screen);
|
||||
int sh = DisplayHeight(wm->dpy, wm->screen);
|
||||
int deskbar_w = 185;
|
||||
int deskbar_w = DESKBAR_W;
|
||||
int half_w = (sw - deskbar_w) / 2;
|
||||
|
||||
c->x = 0;
|
||||
@@ -299,7 +299,7 @@ void client_snap_right(WM *wm, Client *c) {
|
||||
if (c->maximized) client_unmaximize(wm, c);
|
||||
int sw = DisplayWidth(wm->dpy, wm->screen);
|
||||
int sh = DisplayHeight(wm->dpy, wm->screen);
|
||||
int deskbar_w = 185;
|
||||
int deskbar_w = DESKBAR_W;
|
||||
int half_w = (sw - deskbar_w) / 2;
|
||||
|
||||
c->x = half_w;
|
||||
|
||||
Reference in new issue
Block a user