mirror of
https://codeberg.org/dwl/dwl-patches.git
synced 2026-06-11 10:23:19 +00:00
[skipfocus] do not unset-fullscreen
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
diff --git a/config.def.h b/config.def.h
|
||||
index a784eb4..5d3a4f9 100644
|
||||
index 22d2171..9f6599c 100644
|
||||
--- a/config.def.h
|
||||
+++ b/config.def.h
|
||||
@@ -21,10 +21,11 @@ static const float fullscreen_bg[] = {0.1f, 0.1f, 0.1f, 1.0f}; /* You ca
|
||||
static int log_level = WLR_ERROR;
|
||||
@@ -22,10 +22,11 @@ static int log_level = WLR_ERROR;
|
||||
|
||||
/* NOTE: ALWAYS keep a rule declared even if you don't use rules (e.g leave at least one example) */
|
||||
static const Rule rules[] = {
|
||||
- /* app_id title tags mask isfloating monitor */
|
||||
+ /* app_id title tags mask isfloating skipfocus monitor */
|
||||
@@ -18,10 +18,10 @@ index a784eb4..5d3a4f9 100644
|
||||
|
||||
/* layout(s) */
|
||||
diff --git a/dwl.c b/dwl.c
|
||||
index 6f041a0..90ac57b 100644
|
||||
index 145fd01..ec9d1af 100644
|
||||
--- a/dwl.c
|
||||
+++ b/dwl.c
|
||||
@@ -137,7 +137,7 @@ typedef struct {
|
||||
@@ -138,7 +138,7 @@ typedef struct {
|
||||
#endif
|
||||
unsigned int bw;
|
||||
uint32_t tags;
|
||||
@@ -30,7 +30,7 @@ index 6f041a0..90ac57b 100644
|
||||
uint32_t resize; /* configure serial of a pending resize */
|
||||
} Client;
|
||||
|
||||
@@ -228,6 +228,7 @@ typedef struct {
|
||||
@@ -229,6 +229,7 @@ typedef struct {
|
||||
const char *title;
|
||||
uint32_t tags;
|
||||
int isfloating;
|
||||
@@ -38,7 +38,7 @@ index 6f041a0..90ac57b 100644
|
||||
int monitor;
|
||||
} Rule;
|
||||
|
||||
@@ -464,6 +465,7 @@ applyrules(Client *c)
|
||||
@@ -465,6 +466,7 @@ applyrules(Client *c)
|
||||
if ((!r->title || strstr(title, r->title))
|
||||
&& (!r->id || strstr(appid, r->id))) {
|
||||
c->isfloating = r->isfloating;
|
||||
@@ -46,7 +46,7 @@ index 6f041a0..90ac57b 100644
|
||||
newtags |= r->tags;
|
||||
i = 0;
|
||||
wl_list_for_each(m, &mons, link) {
|
||||
@@ -1307,6 +1309,13 @@ focusclient(Client *c, int lift)
|
||||
@@ -1323,6 +1325,13 @@ focusclient(Client *c, int lift)
|
||||
if (locked)
|
||||
return;
|
||||
|
||||
@@ -60,3 +60,22 @@ index 6f041a0..90ac57b 100644
|
||||
/* Raise client in stacking order if requested */
|
||||
if (c && lift)
|
||||
wlr_scene_node_raise_to_top(&c->scene->node);
|
||||
@@ -1692,11 +1701,13 @@ mapnotify(struct wl_listener *listener, void *data)
|
||||
printstatus();
|
||||
|
||||
unset_fullscreen:
|
||||
- m = c->mon ? c->mon : xytomon(c->geom.x, c->geom.y);
|
||||
- wl_list_for_each(w, &clients, link) {
|
||||
- if (w != c && w->isfullscreen && m == w->mon && (w->tags & c->tags))
|
||||
- setfullscreen(w, 0);
|
||||
- }
|
||||
+ if (!c->skipfocus) {
|
||||
+ m = c->mon ? c->mon : xytomon(c->geom.x, c->geom.y);
|
||||
+ wl_list_for_each(w, &clients, link) {
|
||||
+ if (w != c && w->isfullscreen && m == w->mon && (w->tags & c->tags))
|
||||
+ setfullscreen(w, 0);
|
||||
+ }
|
||||
+ }
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
Reference in New Issue
Block a user