...to address regression introduced by
57075ce and enables panel/desktop
clients which rely on window rules to remain in the same position when
the usable-area changes (normally because an exclusive layer-shell
clients is started/finished).
Also disallows interactive move/resize, for example by alt +
mouse-press.
Fixes: #1235
*<windowRules><windowRule ignoreFocusRequest="">* [yes|no|default]
*ignoreFocusRequest* prevent window to activate itself.
+*<windowRules><windowRule fixedPosition="">* [yes|no|default]
+ *fixedPosition* disallows interactive move/resize and prevents
+ re-positioning in response to changes in reserved output space, which
+ can be caused by *<margin>* settings or exclusive layer-shell clients
+ such as panels.
+
## ENVIRONMENT VARIABLES
*XCURSOR_THEME* and *XCURSOR_SIZE* are supported to set cursor theme
<windowRule title="pcmanfm-desktop*">
<skipTaskbar>yes</skipTaskbar>
<skipWindowSwitcher>yes</skipWindowSwitcher>
+ <fixedPosition>yes</fixedPosition>
<action name="MoveTo" x="0" y="0" />
<action name="ToggleAlwaysOnBottom"/>
</windowRule>
enum property skip_taskbar;
enum property skip_window_switcher;
enum property ignore_focus_request;
+ enum property fixed_position;
struct wl_list link; /* struct rcxml.window_rules */
};
set_property(content, ¤t_window_rule->skip_window_switcher);
} else if (!strcasecmp(nodename, "ignoreFocusRequest")) {
set_property(content, ¤t_window_rule->ignore_focus_request);
+ } else if (!strcasecmp(nodename, "fixedPosition")) {
+ set_property(content, ¤t_window_rule->fixed_position);
/* Actions */
} else if (!strcmp(nodename, "name.action")) {
#include "regions.h"
#include "resize_indicator.h"
#include "view.h"
+#include "window-rules.h"
static int
max_move_scale(double pos_cursor, double pos_current,
return;
}
+ if (window_rules_get_property(view, "fixedPosition") == LAB_PROP_TRUE) {
+ return;
+ }
+
switch (mode) {
case LAB_INPUT_STATE_MOVE:
if (view->fullscreen) {
return false;
}
+ if (window_rules_get_property(view, "fixedPosition") == LAB_PROP_TRUE) {
+ return false;
+ }
+
bool adjusted = false;
/*
* First check whether the view is onscreen. For now, "onscreen"
&& !strcasecmp(property, "ignoreFocusRequest")) {
return rule->ignore_focus_request;
}
+ if (rule->fixed_position
+ && !strcasecmp(property, "fixedPosition")) {
+ return rule->fixed_position;
+ }
}
}
return LAB_PROP_UNSPECIFIED;