Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions openbox/actions/if.c
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ typedef struct {
gboolean decor_on;
gboolean omnipresent_on;
gboolean omnipresent_off;
gboolean fullscreen_on;
gboolean fullscreen_off;
gboolean desktop_current;
gboolean desktop_other;
guint desktop_number;
Expand Down Expand Up @@ -185,6 +187,7 @@ static void setup_query(Options* o, xmlNodePtr node, QueryTarget target) {
set_bool(node, "urgent", &q->urgent_on, &q->urgent_off);
set_bool(node, "undecorated", &q->decor_off, &q->decor_on);
set_bool(node, "omnipresent", &q->omnipresent_on, &q->omnipresent_off);
set_bool(node, "fullscreen", &q->fullscreen_on, &q->fullscreen_off);

xmlNodePtr n;
if ((n = obt_xml_find_node(node, "desktop"))) {
Expand Down Expand Up @@ -385,6 +388,11 @@ static gboolean run_func_if(ObActionsData *data, gpointer options)
if (q->omnipresent_off)
is_true &= query_target->desktop != DESKTOP_ALL;

if (q->fullscreen_on)
is_true &= query_target->fullscreen;
if (q->fullscreen_off)
is_true &= !query_target->fullscreen;

gboolean is_on_current_desktop =
query_target->desktop == screen_desktop ||
query_target->desktop == DESKTOP_ALL;
Expand Down