mirror of
https://codeberg.org/dwl/dwl-patches.git
synced 2025-10-26 09:44:21 +00:00
Compare commits
3 Commits
157b50a671
...
c7315209ed
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c7315209ed | ||
|
|
81918594ce | ||
|
|
4263f5be4d |
9
patches/controlled_fullscreen/README.md
Normal file
9
patches/controlled_fullscreen/README.md
Normal file
@ -0,0 +1,9 @@
|
||||
### Description
|
||||
This patch allow a window to adjust its layout as if it was fullscreen, but it won't change its size and position, and it will stays under the control of dwl. For example a video on a browser can occupy the whole space reserved to the window, but we can still resize it and move it and see the status bar.
|
||||
|
||||
### Download
|
||||
- [git branch](https://codeberg.org/Kana/dwl/src/branch/controlled_fullscreen)
|
||||
- [main 2025-10-08](https://codeberg.org/dwl/dwl-patches/raw/branch/main/patches/controlled_fullscreen/controlled_fullscreen.patch)
|
||||
|
||||
### Authors
|
||||
- [André Desgualdo Pereira](https://codeberg.org/Kana)
|
||||
140
patches/controlled_fullscreen/controlled_fullscreen.patch
Normal file
140
patches/controlled_fullscreen/controlled_fullscreen.patch
Normal file
@ -0,0 +1,140 @@
|
||||
From 33e9b8a227b63e344407c1e4d137b574483cbd1e Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Andr=C3=A9=20Desgualdo=20Pereira?= <desgua@gmail.com>
|
||||
Date: Wed, 8 Oct 2025 17:38:00 -0300
|
||||
Subject: [PATCH] controlled fullscreen
|
||||
|
||||
---
|
||||
dwl.c | 33 ++++++++++++---------------------
|
||||
1 file changed, 12 insertions(+), 21 deletions(-)
|
||||
|
||||
diff --git a/dwl.c b/dwl.c
|
||||
index 12f441e..c74380d 100644
|
||||
--- a/dwl.c
|
||||
+++ b/dwl.c
|
||||
@@ -518,9 +518,6 @@ arrange(Monitor *m)
|
||||
}
|
||||
}
|
||||
|
||||
- wlr_scene_node_set_enabled(&m->fullscreen_bg->node,
|
||||
- (c = focustop(m)) && c->isfullscreen);
|
||||
-
|
||||
strncpy(m->ltsymbol, m->lt[m->sellt]->symbol, LENGTH(m->ltsymbol));
|
||||
|
||||
/* We move all clients (except fullscreen and unmanaged) to LyrTile while
|
||||
@@ -878,7 +875,7 @@ commitnotify(struct wl_listener *listener, void *data)
|
||||
return;
|
||||
}
|
||||
|
||||
- resize(c, c->geom, (c->isfloating && !c->isfullscreen));
|
||||
+ resize(c, c->geom, (c->isfloating));
|
||||
|
||||
/* mark a pending resize as completed */
|
||||
if (c->resize && c->resize <= c->surface.xdg->current.configure_serial)
|
||||
@@ -1490,7 +1487,7 @@ focusstack(const Arg *arg)
|
||||
{
|
||||
/* Focus the next or previous client (in tiling order) on selmon */
|
||||
Client *c, *sel = focustop(selmon);
|
||||
- if (!sel || (sel->isfullscreen && !client_has_children(sel)))
|
||||
+ if (!sel)
|
||||
return;
|
||||
if (arg->i > 0) {
|
||||
wl_list_for_each(c, &sel->link, link) {
|
||||
@@ -1826,7 +1823,7 @@ monocle(Monitor *m)
|
||||
int n = 0;
|
||||
|
||||
wl_list_for_each(c, &clients, link) {
|
||||
- if (!VISIBLEON(c, m) || c->isfloating || c->isfullscreen)
|
||||
+ if (!VISIBLEON(c, m) || c->isfloating)
|
||||
continue;
|
||||
resize(c, m->w, 0);
|
||||
n++;
|
||||
@@ -1957,7 +1954,7 @@ moveresize(const Arg *arg)
|
||||
if (cursor_mode != CurNormal && cursor_mode != CurPressed)
|
||||
return;
|
||||
xytonode(cursor->x, cursor->y, NULL, &grabc, NULL, NULL, NULL);
|
||||
- if (!grabc || client_is_unmanaged(grabc) || grabc->isfullscreen)
|
||||
+ if (!grabc || client_is_unmanaged(grabc))
|
||||
return;
|
||||
|
||||
/* Float the window and tell motionnotify to grab it */
|
||||
@@ -2332,14 +2329,12 @@ setcursorshape(struct wl_listener *listener, void *data)
|
||||
void
|
||||
setfloating(Client *c, int floating)
|
||||
{
|
||||
- Client *p = client_get_parent(c);
|
||||
c->isfloating = floating;
|
||||
/* If in floating layout do not change the client's layer */
|
||||
if (!c->mon || !client_surface(c)->mapped || !c->mon->lt[c->mon->sellt]->arrange)
|
||||
return;
|
||||
- wlr_scene_node_reparent(&c->scene->node, layers[c->isfullscreen ||
|
||||
- (p && p->isfullscreen) ? LyrFS
|
||||
- : c->isfloating ? LyrFloat : LyrTile]);
|
||||
+ wlr_scene_node_reparent(&c->scene->node,
|
||||
+ layers[c->isfloating ? LyrFloat : LyrTile]);
|
||||
arrange(c->mon);
|
||||
printstatus();
|
||||
}
|
||||
@@ -2352,12 +2347,12 @@ setfullscreen(Client *c, int fullscreen)
|
||||
return;
|
||||
c->bw = fullscreen ? 0 : borderpx;
|
||||
client_set_fullscreen(c, fullscreen);
|
||||
- wlr_scene_node_reparent(&c->scene->node, layers[c->isfullscreen
|
||||
- ? LyrFS : c->isfloating ? LyrFloat : LyrTile]);
|
||||
|
||||
+ wlr_scene_node_reparent(&c->scene->node,
|
||||
+ layers[c->isfloating ? LyrFloat : LyrTile]);
|
||||
if (fullscreen) {
|
||||
c->prev = c->geom;
|
||||
- resize(c, c->mon->m, 0);
|
||||
+ resize(c, c->mon->w, 0);
|
||||
} else {
|
||||
/* restore previous size instead of arrange for floating windows since
|
||||
* client positions are set by the user and cannot be recalculated */
|
||||
@@ -2413,7 +2408,6 @@ setmon(Client *c, Monitor *m, uint32_t newtags)
|
||||
/* Make sure window actually overlaps with the monitor */
|
||||
resize(c, c->geom, 0);
|
||||
c->tags = newtags ? newtags : m->tagset[m->seltags]; /* assign tags of target monitor */
|
||||
- setfullscreen(c, c->isfullscreen); /* This will call arrange(c->mon) */
|
||||
setfloating(c, c->isfloating);
|
||||
}
|
||||
focusclient(focustop(selmon), 1);
|
||||
@@ -2716,7 +2710,7 @@ tile(Monitor *m)
|
||||
Client *c;
|
||||
|
||||
wl_list_for_each(c, &clients, link)
|
||||
- if (VISIBLEON(c, m) && !c->isfloating && !c->isfullscreen)
|
||||
+ if (VISIBLEON(c, m) && !c->isfloating)
|
||||
n++;
|
||||
if (n == 0)
|
||||
return;
|
||||
@@ -2727,7 +2721,7 @@ tile(Monitor *m)
|
||||
mw = m->w.width;
|
||||
i = my = ty = 0;
|
||||
wl_list_for_each(c, &clients, link) {
|
||||
- if (!VISIBLEON(c, m) || c->isfloating || c->isfullscreen)
|
||||
+ if (!VISIBLEON(c, m) || c->isfloating)
|
||||
continue;
|
||||
if (i < m->nmaster) {
|
||||
resize(c, (struct wlr_box){.x = m->w.x, .y = m->w.y + my, .width = mw,
|
||||
@@ -2747,7 +2741,7 @@ togglefloating(const Arg *arg)
|
||||
{
|
||||
Client *sel = focustop(selmon);
|
||||
/* return if fullscreen */
|
||||
- if (sel && !sel->isfullscreen)
|
||||
+ if (sel)
|
||||
setfloating(sel, !sel->isfloating);
|
||||
}
|
||||
|
||||
@@ -2902,9 +2896,6 @@ updatemons(struct wl_listener *listener, void *data)
|
||||
arrangelayers(m);
|
||||
/* Don't move clients to the left output when plugging monitors */
|
||||
arrange(m);
|
||||
- /* make sure fullscreen clients have the right size */
|
||||
- if ((c = focustop(m)) && c->isfullscreen)
|
||||
- resize(c, m->m, 0);
|
||||
|
||||
/* Try to re-set the gamma LUT when updating monitors,
|
||||
* it's only really needed when enabling a disabled output, but meh. */
|
||||
--
|
||||
2.51.0
|
||||
|
||||
@ -1,16 +1,16 @@
|
||||
From e504dc0fccfc3994962f03dc824d8907c6afc64f Mon Sep 17 00:00:00 2001
|
||||
From: choc <notchoc@proton.me>
|
||||
Date: Sat, 4 May 2024 01:16:12 +0800
|
||||
Subject: [PATCH] implement wlr-tablet-v2
|
||||
From 9221dab35862605bd8768652488f8d6211f15a3e Mon Sep 17 00:00:00 2001
|
||||
From: Fernando Otto <fernandootto369@gmail.com>
|
||||
Date: Tue, 14 Oct 2025 12:52:30 -0300
|
||||
Subject: [PATCH] Fixing disconnect with the graphics tablet
|
||||
|
||||
---
|
||||
Makefile | 6 +-
|
||||
config.def.h | 1 +
|
||||
dwl.c | 224 +++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
3 files changed, 230 insertions(+), 1 deletion(-)
|
||||
dwl.c | 226 +++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
3 files changed, 232 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/Makefile b/Makefile
|
||||
index f955e7b..ce1b556 100644
|
||||
index 3358bae..47a2bb2 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -21,7 +21,8 @@ dwl: dwl.o util.o
|
||||
@ -46,7 +46,7 @@ index 22d2171..3ad98ef 100644
|
||||
static const int bypass_surface_visibility = 0; /* 1 means idle inhibitors will disable idle tracking even if it's surface isn't visible */
|
||||
static const unsigned int borderpx = 1; /* border pixel of windows */
|
||||
diff --git a/dwl.c b/dwl.c
|
||||
index ac9c36b..b8d129f 100644
|
||||
index a2711f6..97d3d53 100644
|
||||
--- a/dwl.c
|
||||
+++ b/dwl.c
|
||||
@@ -50,6 +50,9 @@
|
||||
@ -132,13 +132,15 @@ index ac9c36b..b8d129f 100644
|
||||
void
|
||||
cursorconstrain(struct wlr_pointer_constraint_v1 *constraint)
|
||||
{
|
||||
@@ -1321,6 +1362,27 @@ destroykeyboardgroup(struct wl_listener *listener, void *data)
|
||||
@@ -1320,6 +1361,29 @@ destroykeyboardgroup(struct wl_listener *listener, void *data)
|
||||
free(group);
|
||||
}
|
||||
|
||||
+void
|
||||
+destroytablet(struct wl_listener *listener, void *data)
|
||||
+{
|
||||
+ wl_list_remove(&tablet_device_destroy.link);
|
||||
+ wlr_cursor_detach_input_device(cursor, tablet->wlr_device);
|
||||
+ tablet = NULL;
|
||||
+}
|
||||
+
|
||||
@ -160,7 +162,7 @@ index ac9c36b..b8d129f 100644
|
||||
Monitor *
|
||||
dirtomon(enum wlr_direction dir)
|
||||
{
|
||||
@@ -1540,6 +1602,12 @@ inputdevice(struct wl_listener *listener, void *data)
|
||||
@@ -1539,6 +1603,12 @@ inputdevice(struct wl_listener *listener, void *data)
|
||||
case WLR_INPUT_DEVICE_POINTER:
|
||||
createpointer(wlr_pointer_from_input_device(device));
|
||||
break;
|
||||
@ -173,7 +175,7 @@ index ac9c36b..b8d129f 100644
|
||||
default:
|
||||
/* TODO handle other input device types */
|
||||
break;
|
||||
@@ -2567,6 +2635,8 @@ setup(void)
|
||||
@@ -2566,6 +2636,8 @@ setup(void)
|
||||
|
||||
relative_pointer_mgr = wlr_relative_pointer_manager_v1_create(dpy);
|
||||
|
||||
@ -182,7 +184,7 @@ index ac9c36b..b8d129f 100644
|
||||
/*
|
||||
* Creates a cursor, which is a wlroots utility for tracking the cursor
|
||||
* image shown on screen.
|
||||
@@ -2596,6 +2666,10 @@ setup(void)
|
||||
@@ -2595,6 +2667,10 @@ setup(void)
|
||||
LISTEN_STATIC(&cursor->events.button, buttonpress);
|
||||
LISTEN_STATIC(&cursor->events.axis, axisnotify);
|
||||
LISTEN_STATIC(&cursor->events.frame, cursorframe);
|
||||
@ -193,7 +195,7 @@ index ac9c36b..b8d129f 100644
|
||||
|
||||
cursor_shape_mgr = wlr_cursor_shape_manager_v1_create(dpy, 1);
|
||||
LISTEN_STATIC(&cursor_shape_mgr->events.request_set_shape, setcursorshape);
|
||||
@@ -2689,6 +2763,156 @@ tagmon(const Arg *arg)
|
||||
@@ -2688,6 +2764,156 @@ tagmon(const Arg *arg)
|
||||
setmon(sel, dirtomon(arg->i), 0);
|
||||
}
|
||||
|
||||
@ -351,5 +353,5 @@ index ac9c36b..b8d129f 100644
|
||||
tile(Monitor *m)
|
||||
{
|
||||
--
|
||||
2.43.0
|
||||
2.51.0
|
||||
|
||||
|
||||
@ -1,14 +1,13 @@
|
||||
From dd0abf07f9f3e456428b07e442b87578128da310 Mon Sep 17 00:00:00 2001
|
||||
From: A Frederick Christensen <dwl@ivories.org>
|
||||
Date: Sat, 17 May 2025 23:26:15 -0500
|
||||
Subject: [PATCH] Add tablet input
|
||||
From f639289974285207be396eac085cce6a316294c0 Mon Sep 17 00:00:00 2001
|
||||
From: Fernando Otto <fernandootto369@gmail.com>
|
||||
Date: Tue, 14 Oct 2025 12:20:37 -0300
|
||||
Subject: [PATCH] Fixing disconnect with the graphics tablet
|
||||
|
||||
Signed-off-by: Aldrik Dunbar <aldrik@gmail.com>
|
||||
---
|
||||
Makefile | 6 +-
|
||||
config.def.h | 1 +
|
||||
dwl.c | 238 +++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
3 files changed, 244 insertions(+), 1 deletion(-)
|
||||
dwl.c | 240 +++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
3 files changed, 246 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/Makefile b/Makefile
|
||||
index 578194f..e0d1835 100644
|
||||
@ -47,7 +46,7 @@ index 95c2afa..1f06356 100644
|
||||
static const int bypass_surface_visibility = 0; /* 1 means idle inhibitors will disable idle tracking even if it's surface isn't visible */
|
||||
static const unsigned int borderpx = 1; /* border pixel of windows */
|
||||
diff --git a/dwl.c b/dwl.c
|
||||
index 12f441e..1f3b325 100644
|
||||
index 12f441e..43566fe 100644
|
||||
--- a/dwl.c
|
||||
+++ b/dwl.c
|
||||
@@ -51,6 +51,9 @@
|
||||
@ -146,13 +145,15 @@ index 12f441e..1f3b325 100644
|
||||
void
|
||||
cursorconstrain(struct wlr_pointer_constraint_v1 *constraint)
|
||||
{
|
||||
@@ -1383,6 +1430,27 @@ destroykeyboardgroup(struct wl_listener *listener, void *data)
|
||||
@@ -1383,6 +1430,29 @@ destroykeyboardgroup(struct wl_listener *listener, void *data)
|
||||
free(group);
|
||||
}
|
||||
|
||||
+void
|
||||
+destroytablet(struct wl_listener *listener, void *data)
|
||||
+{
|
||||
+ wl_list_remove(&tablet_device_destroy.link);
|
||||
+ wlr_cursor_detach_input_device(cursor, tablet->wlr_device);
|
||||
+ tablet = NULL;
|
||||
+}
|
||||
+
|
||||
@ -174,7 +175,7 @@ index 12f441e..1f3b325 100644
|
||||
Monitor *
|
||||
dirtomon(enum wlr_direction dir)
|
||||
{
|
||||
@@ -1590,6 +1658,12 @@ inputdevice(struct wl_listener *listener, void *data)
|
||||
@@ -1590,6 +1660,12 @@ inputdevice(struct wl_listener *listener, void *data)
|
||||
case WLR_INPUT_DEVICE_POINTER:
|
||||
createpointer(wlr_pointer_from_input_device(device));
|
||||
break;
|
||||
@ -187,7 +188,7 @@ index 12f441e..1f3b325 100644
|
||||
default:
|
||||
/* TODO handle other input device types */
|
||||
break;
|
||||
@@ -2584,6 +2658,8 @@ setup(void)
|
||||
@@ -2584,6 +2660,8 @@ setup(void)
|
||||
|
||||
relative_pointer_mgr = wlr_relative_pointer_manager_v1_create(dpy);
|
||||
|
||||
@ -196,7 +197,7 @@ index 12f441e..1f3b325 100644
|
||||
/*
|
||||
* Creates a cursor, which is a wlroots utility for tracking the cursor
|
||||
* image shown on screen.
|
||||
@@ -2613,6 +2689,11 @@ setup(void)
|
||||
@@ -2613,6 +2691,11 @@ setup(void)
|
||||
wl_signal_add(&cursor->events.button, &cursor_button);
|
||||
wl_signal_add(&cursor->events.axis, &cursor_axis);
|
||||
wl_signal_add(&cursor->events.frame, &cursor_frame);
|
||||
@ -208,7 +209,7 @@ index 12f441e..1f3b325 100644
|
||||
|
||||
cursor_shape_mgr = wlr_cursor_shape_manager_v1_create(dpy, 1);
|
||||
wl_signal_add(&cursor_shape_mgr->events.request_set_shape, &request_set_cursor_shape);
|
||||
@@ -2708,6 +2789,163 @@ tagmon(const Arg *arg)
|
||||
@@ -2708,6 +2791,163 @@ tagmon(const Arg *arg)
|
||||
setmon(sel, dirtomon(arg->i), 0);
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user