window-rules: support matchOnce attribute

...allowing a rule to be applied to only the first window matching a
particular criteria. For example, the following can be used to apply a
window rule to lxqt-panel but not its configuration window with the same
app_id:

    <windowRules>
      <windowRule identifier="lxqt-panel" matchOnce="true">
        <skipTaskbar>yes</skipTaskbar>
        <action name="MoveTo" x="0" y="0" />
        <action name="ToggleAlwaysOnTop"/>
      </windowRule>
    </windowRules>
This commit is contained in:
Johan Malm 2023-06-07 21:44:38 +01:00
parent 55400a1202
commit 07356111de
5 changed files with 73 additions and 15 deletions

View file

@ -21,6 +21,7 @@ enum property {
struct window_rule {
char *identifier;
char *title;
bool match_once;
enum window_rule_event event;
struct wl_list actions;