mirror of
https://codeberg.org/dwl/dwl-patches.git
synced 2025-09-09 12:45:00 +00:00
Fix monfig crash during nested usage, fix NULL rule
This commit is contained in:
parent
5c86e65aa0
commit
70d2ea226d
@ -1,4 +1,4 @@
|
|||||||
From e7a8ee402ba7f03c621eab9df839aabd8aa5eb4c Mon Sep 17 00:00:00 2001
|
From 73f70cd9d817a307030f360f6c8a2500046b8b76 Mon Sep 17 00:00:00 2001
|
||||||
From: Palanix <palanixyt@gmail.com>
|
From: Palanix <palanixyt@gmail.com>
|
||||||
Date: Mon, 4 Apr 2022 16:08:29 +0200
|
Date: Mon, 4 Apr 2022 16:08:29 +0200
|
||||||
Subject: [PATCH] Updated patch now allowing setting x and y
|
Subject: [PATCH] Updated patch now allowing setting x and y
|
||||||
@ -6,14 +6,14 @@ MIME-Version: 1.0
|
|||||||
Content-Type: text/plain; charset=UTF-8
|
Content-Type: text/plain; charset=UTF-8
|
||||||
Content-Transfer-Encoding: 8bit
|
Content-Transfer-Encoding: 8bit
|
||||||
|
|
||||||
Co-authored-by: Leonardo Hernández Hernández <leohdz172@proton.me
|
Co-authored-by: Leonardo Hernández Hernández <leohdz172@proton.me>
|
||||||
---
|
---
|
||||||
config.def.h | 11 +++++++----
|
config.def.h | 11 +++++++----
|
||||||
dwl.c | 25 +++++++++++++++++++------
|
dwl.c | 25 +++++++++++++++++++------
|
||||||
2 files changed, 26 insertions(+), 10 deletions(-)
|
2 files changed, 26 insertions(+), 10 deletions(-)
|
||||||
|
|
||||||
diff --git a/config.def.h b/config.def.h
|
diff --git a/config.def.h b/config.def.h
|
||||||
index 8847e58..a8860c4 100644
|
index 8f498d2..4ccacd2 100644
|
||||||
--- a/config.def.h
|
--- a/config.def.h
|
||||||
+++ b/config.def.h
|
+++ b/config.def.h
|
||||||
@@ -38,12 +38,15 @@ static const Layout layouts[] = {
|
@@ -38,12 +38,15 @@ static const Layout layouts[] = {
|
||||||
@ -26,18 +26,18 @@ index 8847e58..a8860c4 100644
|
|||||||
+ /* name mfact nmaster scale layout rotate/reflect x y resx resy rate mode adaptive*/
|
+ /* name mfact nmaster scale layout rotate/reflect x y resx resy rate mode adaptive*/
|
||||||
+ /* example of a HiDPI laptop monitor at 120Hz:
|
+ /* example of a HiDPI laptop monitor at 120Hz:
|
||||||
+ { "eDP-1", 0.5f, 1, 2, &layouts[0], WL_OUTPUT_TRANSFORM_NORMAL, 0, 0, 0, 0, 120.000f, 1, 1},
|
+ { "eDP-1", 0.5f, 1, 2, &layouts[0], WL_OUTPUT_TRANSFORM_NORMAL, 0, 0, 0, 0, 120.000f, 1, 1},
|
||||||
|
+ * mode let's the user decide on how dwl should implement the modes:
|
||||||
|
+ * -1 Sets a custom mode following the users choice
|
||||||
|
+ * All other number's set the mode at the index n, 0 is the standard mode; see wlr-randr
|
||||||
*/
|
*/
|
||||||
/* defaults */
|
/* defaults */
|
||||||
- { NULL, 0.55f, 1, 1, &layouts[0], WL_OUTPUT_TRANSFORM_NORMAL, -1, -1 },
|
- { NULL, 0.55f, 1, 1, &layouts[0], WL_OUTPUT_TRANSFORM_NORMAL, -1, -1 },
|
||||||
+ { NULL, 0.55f, 1, 1, &layouts[0], WL_OUTPUT_TRANSFORM_NORMAL, 0, 0, 0, 0, 0.0f, 0 ,1},
|
+ { NULL, 0.55f, 1, 1, &layouts[0], WL_OUTPUT_TRANSFORM_NORMAL, -1, -1, 0, 0, 0.0f, 0 ,1},
|
||||||
+ // mode let's the user decide on how dwl should implement the modes:
|
|
||||||
+ // -1 Sets a custom mode following the users choice
|
|
||||||
+ // All other number's set the mode at the index n, 0 is the standard mode; see wlr-randr
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/* keyboard */
|
/* keyboard */
|
||||||
diff --git a/dwl.c b/dwl.c
|
diff --git a/dwl.c b/dwl.c
|
||||||
index bf763df..fdd603b 100644
|
index 52bfbc8..9609b6d 100644
|
||||||
--- a/dwl.c
|
--- a/dwl.c
|
||||||
+++ b/dwl.c
|
+++ b/dwl.c
|
||||||
@@ -215,6 +215,11 @@ typedef struct {
|
@@ -215,6 +215,11 @@ typedef struct {
|
||||||
@ -50,7 +50,7 @@ index bf763df..fdd603b 100644
|
|||||||
+ int mode;
|
+ int mode;
|
||||||
+ int adaptive;
|
+ int adaptive;
|
||||||
} MonitorRule;
|
} MonitorRule;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
@@ -865,6 +870,7 @@ createmon(struct wl_listener *listener, void *data)
|
@@ -865,6 +870,7 @@ createmon(struct wl_listener *listener, void *data)
|
||||||
/* This event is raised by the backend when a new output (aka a display or
|
/* This event is raised by the backend when a new output (aka a display or
|
||||||
@ -80,7 +80,7 @@ index bf763df..fdd603b 100644
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
- /* The mode is a tuple of (width, height, refresh rate), and each
|
- /* The mode is a tuple of (width, height, refresh rate), and each
|
||||||
- * monitor supports only a specific set of modes. We just pick the
|
- * monitor supports only a specific set of modes. We just pick the
|
||||||
- * monitor's preferred mode; a more sophisticated compositor would let
|
- * monitor's preferred mode; a more sophisticated compositor would let
|
||||||
@ -90,6 +90,6 @@ index bf763df..fdd603b 100644
|
|||||||
/* Set up event listeners */
|
/* Set up event listeners */
|
||||||
LISTEN(&wlr_output->events.frame, &m->frame, rendermon);
|
LISTEN(&wlr_output->events.frame, &m->frame, rendermon);
|
||||||
LISTEN(&wlr_output->events.destroy, &m->destroy, cleanupmon);
|
LISTEN(&wlr_output->events.destroy, &m->destroy, cleanupmon);
|
||||||
--
|
--
|
||||||
2.45.0
|
2.45.1
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user