Commit graph

142 commits

Author SHA1 Message Date
emersion
865b0aa123
xwayland: rename map_notify to map for consistency 2018-03-30 11:01:23 -04:00
Dominique Martinet
2910972b25 xwm.h: fix guard ifdef and remove wlr_ prefix from xwm_atoms_contains 2018-03-04 11:16:18 +01:00
Dominique Martinet
d9a724c4a2 xcb errors: init errors context at start
`xcb_errors_context_new` is more than just a malloc, it does a few
xcb requests so we benefit from not generating a new context everytime
2018-03-03 17:06:30 +01: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
Dominique Martinet
f481791669 xcb error: get unhandled events names
This provides more friendly debug messages for unhandled events,
for example:
[xwayland/xwm.c:1033] unhandled X11 event: FocusOut (10)
[xwayland/xwm.c:1033] unhandled X11 event: MappingNotify (34)
2018-03-03 16:27:29 +01:00
Dominique Martinet
8026cd2a06 xcb error: always log sequence 2018-03-03 16:13:45 +01:00
Dominique Martinet
6f9da97565 xcb errors: address declare-assign style 2018-03-03 12:00:32 +01:00
Dominique Martinet
f8428d1063 xcb errors: optional dependency with improved messages
Now message can look like:
[xwayland/xwm.c:991] xcb error: op ChangeProperty (no minor), code Window (no extension), value 6291465

instead of this one when the lib is not available:
[xwayland/xwm.c:999] xcb error: op 18:0, code 3, sequence 103, value 6291465

The value in case of Window is the window id, so we can tell what
function applied on which window which is a good start.
The sequence ought to be able to tell us more precisely which
invocation it was, but we never log it when calling functions
so is useless in practice and no longer logged.
2018-03-03 11:46:04 +01:00
Dominique Martinet
2a9ba5c8dc xcb errors: log raw values 2018-03-03 11:43:23 +01:00
Dominique Martinet
5ec06dcecd xwm: fix call of xcb_change_window_attributes for old gcc versions
gcc 6.3.0 (at least) complains about &values:
expected ‘const uint32_t * {aka const unsigned int *}’ but argument
is of type ‘uint32_t (*)[1] {aka unsigned int (*)[1]}’

Reported by thorwil on irc
2018-03-01 21:13:00 +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
b1e2718dd7
xwayland: fix some use-after-free in xwm 2018-02-23 10:20:53 +01:00
Drew DeVault
1d9be89e2d
Revert "ELF Visibility" 2018-02-19 18:01:27 -05:00
Scott Anderson
86269052eb Explicitly export EFL symbols 2018-02-19 14:26:40 +13:00
emersion
392d54a35d
Wrap wl_resource_get_user_data into safer helper functions
This ensures we're not incorrectly casting a resource.

Fixes #628
2018-02-13 23:48:46 +01:00
emersion
c2e1474010
Reformat all #include directives 2018-02-12 21:29:23 +01:00
emersion
36ead80cd1
Make wlr_signal_emit_safe private 2018-02-12 19:52:47 +01:00
emersion
5e58d46cc1
Add wlr_signal_emit_safe 2018-02-12 09:12:31 +01:00
emersion
59c53e8333
Merge remote-tracking branch 'upstream/master' into output-damage 2018-01-21 22:18:06 +01:00
emersion
f704c3d42b
rootston: fix damage tracking for fullscreen xwayland views 2018-01-21 22:08:38 +01:00
Johannes Schramm
47eb478c35 style: add else keywords in xwm.c 2018-01-21 17:04:23 +01:00
Johannes Schramm
dcc743047b style: include brackets for if/while/for, even if it's a single statement 2018-01-21 16:28:21 +01:00
emersion
eeffe11337
surface: add wlr_surface new_subsurface and wlr_subsurface destroy events 2018-01-21 14:22:33 +01:00
emersion
65b28b3823
xwayland: render children window in fullscreen 2018-01-14 18:19:37 +01:00
Dominique Martinet
6ed1884c84 xwm_get_render_format: fix typo in error message 2017-12-29 21:23:55 +01:00
Dominique Martinet
a6fb4b007b xwm_get_render_format: check NULL return value 2017-12-29 20:31:04 +01:00
Dominique Martinet
bb0d888f25 xwayland selection: further cleanup on Xwayland exit
This is necessary if our last primary/clipboard selection was on Xwayland,
and we try to paste to native wayland after Xwayland died
2017-12-29 16:30:59 +01:00
Dominique Martinet
f8a346380c xwayland xwm_get_render_format: free reply 2017-12-29 15:56:47 +01:00
Dominique Martinet
dad9543c51 Xwayland: remove xwm from selection seat listeners on destroy 2017-12-29 15:56:26 +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
Tony Crisci
e809250171
Merge pull request #519 from emersion/xwayland-primary-selection
Implement xwayland primary selection sync
2017-12-27 06:23:04 -05:00
Björn Esser
57a09c8ca4
config: Put all defines into config.h 2017-12-26 18:51:27 +01:00
emersion
6dffaa7bb7
Implement xwayland primary selection sync 2017-12-25 16:10:16 +01:00
emersion
5584f42c1e
Destroy xwm selection window on destroy 2017-12-15 00:05:05 +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
a4094c82c7
Support selection MIME types from wayland to xwayland 2017-12-14 16:24:12 +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
emersion
c67a5824b8
Merge branch 'master' into display-destroy 2017-12-11 16:14:03 +01:00
Tony Crisci
52cda5653b Revert "xwm: only take clipboard if window is focused"
This reverts commit e3542d879d.
2017-12-08 09:23:26 -05:00
Tony Crisci
35188834db Merge branch 'master' into feature/xwm-selection 2017-12-08 09:22:44 -05:00
Tony Crisci
31bafc2461 xwm: use edges enum 2017-12-08 06:03:57 -05:00
emersion
b06535718d
Do not destroy wl_client in wlr_xwayland_finish 2017-12-08 01:38:45 +01:00
Tony Crisci
86df909256 xwayland: remove xwayland param from xsurface methods 2017-12-03 17:30:57 -05:00
Tony Crisci
e3542d879d xwm: only take clipboard if window is focused 2017-11-22 14:58:36 -05:00
Tony Crisci
b0683874e9 xwm: send selection data 2017-11-22 08:10:06 -05:00
Tony Crisci
ea6f77b484 xwm: get selection data 2017-11-21 18:25:21 -05:00