mirror of
https://github.com/labwc/labwc.git
synced 2025-11-03 09:01:51 -05:00
Support window-rules
Two types of window rules are supported, actions and properties. They are
defined as shown below.
<windowRules>
<!-- Action -->
<windowRule identifier="some-application">
<action name="Maximize"/>
</windowRule>
<!-- Property -->
<windowRule identifier="foo*" serverDecoration="yes|no"/>
</windowRules>
Rules are applied if windows match the criteria defined by the
'identifier' attribute which relates to app_id for native Wayland windows
and WM_CLASS for XWayland clients.
Matching against patterns with '*' (wildcard) and '?' (joker) is
supported.
Add 'serverDecoration' property.
This commit is contained in:
parent
d0aafb684f
commit
d609c9e3f9
12 changed files with 281 additions and 3 deletions
|
|
@ -6,6 +6,7 @@
|
|||
#include "labwc.h"
|
||||
#include "view.h"
|
||||
#include "view-impl-common.h"
|
||||
#include "window-rules.h"
|
||||
|
||||
void
|
||||
view_impl_move_to_front(struct view *view)
|
||||
|
|
@ -26,6 +27,9 @@ view_impl_move_to_back(struct view *view)
|
|||
void
|
||||
view_impl_map(struct view *view)
|
||||
{
|
||||
if (!view->been_mapped) {
|
||||
window_rules_apply(view, LAB_WINDOW_RULE_EVENT_ON_FIRST_MAP);
|
||||
}
|
||||
desktop_focus_and_activate_view(&view->server->seat, view);
|
||||
view_move_to_front(view);
|
||||
view_update_title(view);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue