From 035d0f6a0632d7d95a96937b381c1095c7905326 Mon Sep 17 00:00:00 2001 From: Mikael Magnusson Date: Sat, 1 Oct 2016 13:47:26 +0200 Subject: [PATCH] Add fullscreen condition to If action --- openbox/actions/if.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/openbox/actions/if.c b/openbox/actions/if.c index c76fb71d..8ae1010a 100644 --- a/openbox/actions/if.c +++ b/openbox/actions/if.c @@ -58,6 +58,8 @@ typedef struct { gboolean maxfull_off; gboolean iconic_on; gboolean iconic_off; + gboolean fullscreen_on; + gboolean fullscreen_off; gboolean focused; gboolean unfocused; gboolean urgent_on; @@ -182,6 +184,7 @@ static void setup_query(Options* o, xmlNodePtr node, QueryTarget target) { set_bool(node, "maximizedhorizontal", &q->maxhorz_on, &q->maxhorz_off); set_bool(node, "maximizedvertical", &q->maxvert_on, &q->maxvert_off); set_bool(node, "iconified", &q->iconic_on, &q->iconic_off); + set_bool(node, "fullscreen", &q->fullscreen_on, &q->fullscreen_off); set_bool(node, "focused", &q->focused, &q->unfocused); set_bool(node, "urgent", &q->urgent_on, &q->urgent_off); set_bool(node, "undecorated", &q->decor_off, &q->decor_on); @@ -346,6 +349,11 @@ static gboolean run_func_if(ObActionsData *data, gpointer options) if (q->iconic_off) is_true &= !query_target->iconic; + if (q->fullscreen_on) + is_true &= query_target->fullscreen; + if (q->fullscreen_off) + is_true &= !query_target->fullscreen; + if (q->maxhorz_on) is_true &= query_target->max_horz; if (q->maxhorz_off) -- 2.34.1