Commit graph

80 commits

Author SHA1 Message Date
emersion
9dd4388ed9 xwayland: document SIGUSR1 handler 2018-08-02 23:29:34 +01:00
Drew DeVault
211ae764fd Initial pass on API stability guarantees
This introduces -DWLR_USE_UNSTABLE and adds information regarding the
stability status to all headers. I started with a conservative set of
headers to mark as stable:

- types/wlr_matrix.h
- util/edges.h
- util/log.h
- util/region.h
- xcursor.h
2018-07-29 19:20:34 -04:00
Markus Ongyerth
81cc842f8f reintroduce xwayland is_unmanaged
153f37bdf5 (#1145) removed the
wlr_xwayland_is_unamanged function while fixing OR, because it was
belieived that it's supposed to work around the broken OR handling.

This was a misunderstanding. is_unmanaged is (while sort of a hack)
intended to work around inherent differences between "real" X sessions
and our Xwayland/wayland situation.

The main reason it exists is to support applications like rofi and dzen,
while not handing focus to other OR windows (which should *not* be
required).
Traditionally, these applications just grabbed input from X and didn't
need to be focused by any logic in the WM. Which of course doesn't work
in wayland compositors. So we have to give them focus in some way.
Giving *every* OR window focus, breaks other applications that don't
expect focus to change.

A testcase that was pointed out to me where wlr_xwayland_is_unamanged was
breaking things is https://github.com/swaywm/sway/issues/2128 (syncplay,
gitk, gitgui)
Supposedly it broke using keyboard to navigate the menus.
I can't reproduce this with this patch. The popups can be navigated as
long as the parent has focus.
2018-07-29 14:43:17 +02:00
Ryan Dwyer
dc58c1356d Introduce set_hints event for xwayland 2018-07-19 21:07:11 +10:00
emersion
153f37bdf5 xwayland: handle override_redirect flag changes
The override_redirect flag can change on configure notify and
on map notify. This adds an event to know when it changes.

This removes wlr_xwayland_surface_is_unmanaged which was wrongly
using the window type to decide whether the view should be
unmanaged.

A similar patch was proposed to Weston, but has never been
merged upstream [1].

[1]: https://patchwork.freedesktop.org/patch/211161/
2018-07-18 18:51:03 +01:00
Vincent Vanlaer
72a75b3a72 Fix Xwayland cleanup
Fixes #964
2018-05-10 01:44:17 +02:00
emersion
8e831cd416
Merge pull request #959 from VincentVanlaer/xwayland-lazy
Add the option to start Xwayland only when a client connects
2018-05-08 23:04:26 +01:00
Vincent Vanlaer
119a6cf35c Make xwayland_finish* clean up wlr_xwayland 2018-05-08 22:22:35 +02:00
Vincent Vanlaer
c80bf1591e Allow xwayland to start lazily
Makes the xwayland startup process two phased.
The first phase just initialises the X11 sockets.
The second phase starts the Xwayland server itself.
When starting xwayland lazily the second phase will be postponed until
a client has connected to the X11 socket.

Changes in behaviour:
The DISPLAY environment is now set immediately after the X11 sockets
are created.
When the Xwayland server is killed or crashes, the sockets will not be
recreated, but reused.

Fixes #849: Start up Xwayland lazily
2018-05-06 23:41:25 +02:00
emersion
cf10cbc00c
Use UTF-8 xwayland window title if available 2018-05-04 20:44:00 +01:00
morganamilo
6305e6327f
Fix typos in comments and strings 2018-05-03 21:59:43 +01:00
emersion
fa02e30adf
xwayland: emit new_surface when unmapped 2018-04-13 14:37:13 +02:00
emersion
8dec7036d0
Always unmap before destroying surface 2018-04-11 23:09:13 -04:00
emersion
17d0440b75
Add wlr_xwayland_surface_ping 2018-04-08 16:28:01 -04:00
Drew DeVault
506acbdecd Missed a spot 2018-04-02 20:57:09 -04:00
emersion
90fbab6f39
xwyaland: fix style issues 2018-03-31 00:35:08 -04:00
emersion
865b0aa123
xwayland: rename map_notify to map for consistency 2018-03-30 11:01:23 -04:00
Dominique Martinet
7d1870c6f1 move xwm.h out of include/wlr
xwm.h was meant to be private, so move it to include/xwayland/xwm.h
We had an ifdef WLR_HAS_XCB_ICCCM in xwayland.h which was easy to move
to xwm, it is not safe to use the WLR_HAS_* in the public headers.

I checked a few of our current users and none rely on xwm.h being
public as expected (rootston, sway, hsroots)
2018-03-03 17:03:21 +01:00
Markus Ongyerth
bb676013ed add xwayland unmanaged tests to support dmenu
This adds `wlr_xwayland_surface_is_unamanged`, to allow compositors more
fine grained control over XWayland focus.
A surface that is unmanaged should not receive focus, while other
windows that are just override redirect may want it (dmenu).
The way unamanged is determined is taken from wlc.
2018-02-26 12:02:49 +01:00
emersion
c2e1474010
Reformat all #include directives 2018-02-12 21:29:23 +01:00
emersion
65b28b3823
xwayland: render children window in fullscreen 2018-01-14 18:19:37 +01:00
Dominique Martinet
ec952931a1 wlr_xwayland: preserve end of struct on restart
This is more robust than trying to recopy a few fields.
Note: wlr_xwayland->events.ready now resets after each trigger, so one can
hook on it again and be called when restart is ready
2017-12-29 20:50:50 +01:00
Dominique Martinet
e0eafa0429 xwayland: listen to wlr_seat destroy signal 2017-12-29 19:00:08 +01:00
Björn Esser
ff13849624
config: Avoid clash with other config-headers 2017-12-27 17:13:58 +01:00
emersion
a79dc7df51
Merge pull request #524 from acrisci/role-committed
[wip] Role committed
2017-12-27 13:02:49 +01:00
Tony Crisci
5c5f0611c4 xwayland: role committed 2017-12-27 06:50:21 -05:00
Björn Esser
57a09c8ca4
config: Put all defines into config.h 2017-12-26 18:51:27 +01:00
emersion
6b42bfad18
Merge branch 'master' into xwm-selection 2017-12-14 23:59:04 +01:00
emersion
75ef7860bb
Merge branch 'master' into display-destroy 2017-12-14 20:29:30 +01:00
emersion
6ef0219763
Merge branch 'master' into xwm-selection 2017-12-14 11:20:38 +01:00
Tony Crisci
ea4b871e16 xwm: user custom event handler 2017-12-13 17:54:19 -05:00
Tony Crisci
35188834db Merge branch 'master' into feature/xwm-selection 2017-12-08 09:22:44 -05:00
emersion
b06535718d
Do not destroy wl_client in wlr_xwayland_finish 2017-12-08 01:38:45 +01:00
emersion
18eb1eee3f
Listen to display destroy in xwayland, rename wlr_egl_free 2017-12-08 00:59:37 +01:00
Tony Crisci
86df909256 xwayland: remove xwayland param from xsurface methods 2017-12-03 17:30:57 -05:00
Tony Crisci
fc17c74516 xwayland: clean up seat setting 2017-11-22 08:23:23 -05:00
Tony Crisci
b0683874e9 xwm: send selection data 2017-11-22 08:10:06 -05:00
Tony Crisci
39e2ea8420 xwm: get selection targets 2017-11-21 18:09:25 -05:00
emersion
016744ef4d
Refactor wlr_list inside wlroots 2017-11-19 00:17:40 +01:00
Drew DeVault
a317ecdab8 Run startup command after xwayland is ready 2017-11-12 16:01:48 -05:00
emersion
3f4ad47421
Use compositor theme for xwm cursor 2017-11-02 16:49:22 +01:00
Tony Crisci
325def3841 xwm: create colormap and visual depth detection 2017-10-27 15:20:50 -04:00
Tony Crisci
be297d9d14 xwm: net wm state 2017-10-27 13:17:34 -04:00
Tony Crisci
6a4290b86a xwm: moveresize events 2017-10-27 10:48:09 -04:00
Tony Crisci
4a106648c4 xwm: remove incorrect implementation of net wm state 2017-10-26 15:58:18 -04:00
Tony Crisci
0d1dd84a48 xwm: improve activation and dont send focus twice 2017-10-25 08:39:28 -04:00
Tony Crisci
e5ee01254b xwm: map and unmap notify 2017-10-24 21:07:46 -04:00
Tony Crisci
2ff94d0036 xwm: get rid of displayable surfaces list 2017-10-24 18:57:20 -04:00
Tony Crisci
79e14f65e0 xwm: fix lists 2017-10-24 14:37:18 -04:00
Tony Crisci
a3f2754668 xwm: add surface to rootston on surface commit 2017-10-24 12:00:43 -04:00