wok-next diff openbox/stuff/patches/d9a405e9.patch @ rev 21727
created recipe for vbindiff
author | Hans-G?nter Theisgen |
---|---|
date | Sat Nov 21 14:32:44 2020 +0100 (2020-11-21) |
parents | |
children |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/openbox/stuff/patches/d9a405e9.patch Sat Nov 21 14:32:44 2020 +0100 1.3 @@ -0,0 +1,45 @@ 1.4 +From d9a405e9b3b0e9bfe5686c6df456138b443d1e35 Mon Sep 17 00:00:00 2001 1.5 +From: Mikael Magnusson <mikachu@gmail.com> 1.6 +Date: Mon, 7 Sep 2015 00:24:03 +0200 1.7 +Subject: [PATCH] Add 'last' as a desktop target for if/foreach 1.8 + 1.9 +--- 1.10 + openbox/actions/if.c | 7 ++++++- 1.11 + 1 file changed, 6 insertions(+), 1 deletion(-) 1.12 + 1.13 +diff --git a/openbox/actions/if.c b/openbox/actions/if.c 1.14 +index a9c4094..c76fb71 100644 1.15 +--- a/openbox/actions/if.c 1.16 ++++ b/openbox/actions/if.c 1.17 +@@ -68,6 +68,7 @@ typedef struct { 1.18 + gboolean omnipresent_off; 1.19 + gboolean desktop_current; 1.20 + gboolean desktop_other; 1.21 ++ gboolean desktop_last; 1.22 + guint desktop_number; 1.23 + guint screendesktop_number; 1.24 + guint client_monitor; 1.25 +@@ -192,8 +193,10 @@ static void setup_query(Options* o, xmlNodePtr node, QueryTarget target) { 1.26 + if ((s = obt_xml_node_string(n))) { 1.27 + if (!g_ascii_strcasecmp(s, "current")) 1.28 + q->desktop_current = TRUE; 1.29 +- if (!g_ascii_strcasecmp(s, "other")) 1.30 ++ else if (!g_ascii_strcasecmp(s, "other")) 1.31 + q->desktop_other = TRUE; 1.32 ++ else if (!g_ascii_strcasecmp(s, "last")) 1.33 ++ q->desktop_last = TRUE; 1.34 + else 1.35 + q->desktop_number = atoi(s); 1.36 + g_free(s); 1.37 +@@ -392,6 +395,8 @@ static gboolean run_func_if(ObActionsData *data, gpointer options) 1.38 + is_true &= is_on_current_desktop; 1.39 + if (q->desktop_other) 1.40 + is_true &= !is_on_current_desktop; 1.41 ++ if (q->desktop_last) 1.42 ++ is_true &= query_target->desktop == screen_last_desktop; 1.43 + 1.44 + if (q->desktop_number) { 1.45 + gboolean is_on_desktop = 1.46 +-- 1.47 +1.9.1 1.48 +