From 375178be4fccf8f610e580ad073c957ddc3c031e Mon Sep 17 00:00:00 2001 From: Dhruva Sambrani <44899822+DhruvaSambrani@users.noreply.github.com> Date: Sat, 6 Jan 2024 15:50:59 +0100 Subject: [PATCH] rename skipfocus name --- skipfocus/20240106.patch | 60 -------------------------------------- skipfocus/skipfocus.patch | 61 ++++++++++++++++++++++++++++++++++++++- 2 files changed, 60 insertions(+), 61 deletions(-) delete mode 100644 skipfocus/20240106.patch mode change 120000 => 100644 skipfocus/skipfocus.patch diff --git a/skipfocus/20240106.patch b/skipfocus/20240106.patch deleted file mode 100644 index e57ba27..0000000 --- a/skipfocus/20240106.patch +++ /dev/null @@ -1,60 +0,0 @@ -diff --git a/config.def.h b/config.def.h -index a8ed61d..fc105de 100644 ---- a/config.def.h -+++ b/config.def.h -@@ -21,11 +21,11 @@ static const float fullscreen_bg[] = {0.1, 0.1, 0.1, 1.0}; /* You can al - static int log_level = WLR_ERROR; - - static const Rule rules[] = { -- /* app_id title tags mask isfloating monitor */ -+ /* app_id title tags mask isfloating skipfocus monitor */ - /* examples: -- { "Gimp", NULL, 0, 1, -1 }, -+ { "Gimp", NULL, 0, 1, 0, -1 }, - */ -- { "firefox", NULL, 1 << 8, 0, -1 }, -+ { "firefox", NULL, 1 << 8, 0, 0, -1 }, - }; - - /* layout(s) */ -diff --git a/dwl.c b/dwl.c -index 4d19357..3826f65 100644 ---- a/dwl.c -+++ b/dwl.c -@@ -132,7 +132,7 @@ typedef struct { - #endif - unsigned int bw; - uint32_t tags; -- int isfloating, isurgent, isfullscreen; -+ int isfloating, isurgent, isfullscreen, skipfocus; - uint32_t resize; /* configure serial of a pending resize */ - } Client; - -@@ -217,6 +217,7 @@ typedef struct { - const char *title; - uint32_t tags; - int isfloating; -+ int skipfocus; - int monitor; - } Rule; - -@@ -440,6 +441,7 @@ applyrules(Client *c) - if ((!r->title || strstr(title, r->title)) - && (!r->id || strstr(appid, r->id))) { - c->isfloating = r->isfloating; -+ c->skipfocus = r->skipfocus; - newtags |= r->tags; - i = 0; - wl_list_for_each(m, &mons, link) { -@@ -1167,6 +1169,11 @@ focusclient(Client *c, int lift) - if (locked) - return; - -+ if (c && c->skipfocus){ -+ c -> skipfocus = 0; -+ return; -+ } -+ - /* Raise client in stacking order if requested */ - if (c && lift) - wlr_scene_node_raise_to_top(&c->scene->node); diff --git a/skipfocus/skipfocus.patch b/skipfocus/skipfocus.patch deleted file mode 120000 index 92b4d31..0000000 --- a/skipfocus/skipfocus.patch +++ /dev/null @@ -1 +0,0 @@ -./20240106.patch \ No newline at end of file diff --git a/skipfocus/skipfocus.patch b/skipfocus/skipfocus.patch new file mode 100644 index 0000000..e57ba27 --- /dev/null +++ b/skipfocus/skipfocus.patch @@ -0,0 +1,60 @@ +diff --git a/config.def.h b/config.def.h +index a8ed61d..fc105de 100644 +--- a/config.def.h ++++ b/config.def.h +@@ -21,11 +21,11 @@ static const float fullscreen_bg[] = {0.1, 0.1, 0.1, 1.0}; /* You can al + static int log_level = WLR_ERROR; + + static const Rule rules[] = { +- /* app_id title tags mask isfloating monitor */ ++ /* app_id title tags mask isfloating skipfocus monitor */ + /* examples: +- { "Gimp", NULL, 0, 1, -1 }, ++ { "Gimp", NULL, 0, 1, 0, -1 }, + */ +- { "firefox", NULL, 1 << 8, 0, -1 }, ++ { "firefox", NULL, 1 << 8, 0, 0, -1 }, + }; + + /* layout(s) */ +diff --git a/dwl.c b/dwl.c +index 4d19357..3826f65 100644 +--- a/dwl.c ++++ b/dwl.c +@@ -132,7 +132,7 @@ typedef struct { + #endif + unsigned int bw; + uint32_t tags; +- int isfloating, isurgent, isfullscreen; ++ int isfloating, isurgent, isfullscreen, skipfocus; + uint32_t resize; /* configure serial of a pending resize */ + } Client; + +@@ -217,6 +217,7 @@ typedef struct { + const char *title; + uint32_t tags; + int isfloating; ++ int skipfocus; + int monitor; + } Rule; + +@@ -440,6 +441,7 @@ applyrules(Client *c) + if ((!r->title || strstr(title, r->title)) + && (!r->id || strstr(appid, r->id))) { + c->isfloating = r->isfloating; ++ c->skipfocus = r->skipfocus; + newtags |= r->tags; + i = 0; + wl_list_for_each(m, &mons, link) { +@@ -1167,6 +1169,11 @@ focusclient(Client *c, int lift) + if (locked) + return; + ++ if (c && c->skipfocus){ ++ c -> skipfocus = 0; ++ return; ++ } ++ + /* Raise client in stacking order if requested */ + if (c && lift) + wlr_scene_node_raise_to_top(&c->scene->node);