Comments (3)
The window rules are set up to have different events even though only ON_FIRST_MAP
is implemented so far (and is the default if the event
argument is missing from the window rule). I guess we could just add another event like ON_CREATE
or something like that. However, I am also not sure about the implications of having the event run before map.
E.g. something like this:
<windowRule identifier="foot" event="onCreate">
<action name="SnapToEdge" direction="up" />
</windowRule>
from labwc.
This can be solved by applying window rules before the client maps a surface. I confirmed the following patch solves the flickering issue for xdg-shell clients, but I'm not sure if it's okay to apply normal actions against views that have not been mapped.
diff --git a/src/xdg.c b/src/xdg.c
index 4e6d6dad..ce06259a 100644
--- a/src/xdg.c
+++ b/src/xdg.c
@@ -795,6 +795,8 @@ xdg_surface_new(struct wl_listener *listener, void *data)
CONNECT_SIGNAL(xdg_surface, xdg_toplevel_view, new_popup);
wl_list_insert(&server->views, &view->link);
+
+ window_rules_apply(view, LAB_WINDOW_RULE_EVENT_ON_FIRST_MAP);
}
void
Another approach would be disabling the view node until the client applies the geometry requested by window rules, but the problem is wlroots automatically sends wl_surface.leave
and doesn't return frame callback if the node is disabled, thus the configure event timeouts.
from labwc.
I think onCreate
is usefu also when the user want to open a fullscreen window in a fixed output (#1859).
from labwc.
Related Issues (20)
- Add resistance option for tiled windows HOT 3
- shadows of qt windows HOT 2
- Monitor configuration when in greeter HOT 6
- Controls in GTK2 applications (Tried in GIMP) don't work or if they work, just barely HOT 9
- Magnifier doesn't work with full-screen surfaces (direct scanout?) HOT 22
- Choose wlroots version when compiling HOT 9
- max_toggled button should fallback to max HOT 1
- 0.7.3: Tablet: Thunar always makes multi selection on left click HOT 2
- way to customize CapsLock behavior? HOT 2
- Stylus input doesn't rotate. HOT 8
- Doubled shortcuts depending on layout HOT 2
- chromium won't open fully maximized on launch HOT 29
- last version doesn't work HOT 1
- single-clicking on chromium's titlebar unmaximizes/untiles the window. HOT 1
- labwc is not detecting mouse clicks while the cursor is moving HOT 3
- Application menus open in incorrect location when portion of window overlaps multiple outputs HOT 7
- Xwayland doesn't work in fullscreen HOT 8
- Document the `format` attribute for custom window switcher format strings
- xdg-popup: un-constraining is incorrect with gedit (CSD clients with shadow) HOT 1
- Animations & desktop effects HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from labwc.