fix xwayland border

This commit is contained in:
2026-05-04 12:40:06 +07:00
parent ba803af701
commit 385ff13e7b
5 changed files with 10 additions and 6 deletions
+1
View File
@@ -7,6 +7,7 @@ proto:
compile: proto compile: proto
gcc -o absinthe src/* \ gcc -o absinthe src/* \
-Wall -Wextra -Wpedantic \ -Wall -Wextra -Wpedantic \
-DXWAYLAND \
-I./ -I./include -DWLR_USE_UNSTABLE $(shell pkg-config wlroots-0.20 --libs --cflags) -lwayland-server -lxkbcommon \ -I./ -I./include -DWLR_USE_UNSTABLE $(shell pkg-config wlroots-0.20 --libs --cflags) -lwayland-server -lxkbcommon \
-O3 \ -O3 \
-g -g
+4 -3
View File
@@ -7,13 +7,14 @@
#define TOPLEVEL_BW 1 #define TOPLEVEL_BW 1
static const float focused_bc[4] = { 0.64, 0.75, 0.55, 1.0 }; static const float focused_bc[4] = { 0.0, 0.0, 1.0, 1.0 };
static const float urgent_bc[4] = { 0.84, 0.47, 0.5, 1.0 }; static const float urgent_bc[4] = { 1.0, 0.0, 0.0, 1.0 };
static const float unfocused_bc[4] = { 0.39, 0.42, 0.46, 1.0 }; static const float unfocused_bc[4] = { 0.28, 0.28, 0.28, 1.0 };
#define MSTACK_SIZE 1 #define MSTACK_SIZE 1
#define MSTACK_WIDTH 0.5 #define MSTACK_WIDTH 0.5
#define OUTPUT_GAP 0 #define OUTPUT_GAP 0
#define LAYOUT_GAP 0 #define LAYOUT_GAP 0
#endif #endif
+1 -1
View File
@@ -39,7 +39,7 @@ focus_toplevel(struct absinthe_toplevel *toplevel)
struct wlr_xwayland_surface *prev_xwayland_surface = struct wlr_xwayland_surface *prev_xwayland_surface =
wlr_xwayland_surface_try_from_wlr_surface(prev_surface); wlr_xwayland_surface_try_from_wlr_surface(prev_surface);
if (prev_xwayland_surface) if (prev_xwayland_surface)
toplevel_set_border_color(prev_surface->data, toplevel_set_border_color(prev_xwayland_surface->data,
unfocused_bc); unfocused_bc);
#endif #endif
} }
+1 -1
View File
@@ -31,7 +31,7 @@ handle_keybind(struct absinthe_server *server, xkb_keysym_t keysym)
break; break;
case XKB_KEY_Return: case XKB_KEY_Return:
if (fork() == 0) if (fork() == 0)
execl("/bin/sh", "sh", "-c", "ghostty", NULL); execl("/bin/sh", "sh", "-c", "alacritty", NULL);
break; break;
case XKB_KEY_r: case XKB_KEY_r:
if (fork() == 0) if (fork() == 0)
+2
View File
@@ -80,6 +80,8 @@ new_xdg_toplevel(struct wl_listener *listener, void *data)
toplevel->xdg = xdg_toplevel; toplevel->xdg = xdg_toplevel;
toplevel->xdg->base->data = toplevel; toplevel->xdg->base->data = toplevel;
wlr_surface_set_preferred_buffer_scale(toplevel->xdg->base->surface, 1);
toplevel->commit.notify = toplevel_commit; toplevel->commit.notify = toplevel_commit;
wl_signal_add(&xdg_toplevel->base->surface->events.commit, wl_signal_add(&xdg_toplevel->base->surface->events.commit,
&toplevel->commit); &toplevel->commit);