Commit Graph

219 Commits

Author SHA1 Message Date
Drew DeVault fac2c3e25f
Merge pull request #882 from emersion/unprefix-local-symbols
Remove wlr_ prefix from local symbols
2018-04-26 11:18:01 +02:00
Guido Guenther 085452f9d9 Use correct printf format specifiers for ssize_t
This unbreaks the build on armhf that otherwise fails like

    ../xwayland/selection/incoming.c: In function 'xwm_data_source_write':
    ../include/wlr/util/log.h:34:17: error: format '%ld' expects argument of type 'long int', but argument 6 has type 'ssize_t {aka int}' [-Werror=format=]
      _wlr_log(verb, "[%s:%d] " fmt, wlr_strip_path(__FILE__), __LINE__, ##__VA_ARGS__)
                     ^
    ../xwayland/selection/incoming.c:34:2: note: in expansion of macro 'wlr_log'
      wlr_log(L_DEBUG, "wrote %zd (chunk size %ld) of %d bytes",
      ^~~~~~~
    ../xwayland/selection/incoming.c:34:44: note: format string is defined here
      wlr_log(L_DEBUG, "wrote %zd (chunk size %ld) of %d bytes",
                                              ~~^
                                              %d
2018-04-26 10:46:11 +02:00
emersion 625a7a48dc
Don't use the wlr_ prefix for static functions 2018-04-25 23:51:00 +01:00
emersion 71ca45e2c0
Make sure we don't use others' prefixes 2018-04-25 23:24:58 +01:00
Drew DeVault 12bf39a715
Merge pull request #885 from emersion/remove-surface-subsurface
Remove wlr_surface::subsurface, add wlr_subcompositor
2018-04-22 10:54:15 +02:00
n3rdopolis a470f101c1
xwayland: preserve the PATH variable
Some systems don't have xwayland in /usr/bin, but in other paths. 
wlroots was unable to find Xwayland binaries outside of standard locations
2018-04-21 19:19:25 -04:00
emersion 3bce5dfc9f
Fix segfaults in wlr_surface_is_* 2018-04-21 19:04:48 +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
emersion c55ad11d96
xwayland: add _NET_WM_WINDOW_TYPE_MENU support 2018-04-08 12:02:52 -04:00
emersion 8b07a4d055
Emit xwayland unmap signal before unmapping
This allows compositors to access the surface being unmapped. This
is also more consistent with the destroy signal.
2018-04-06 14:13:52 -04:00
emersion 591ea27cf9
xwayland: refactor selection code 2018-04-03 12:56:54 -04:00
emersion 67dec2da2b
xwayland: fix incoming incr transfers 2018-04-03 11:26:55 -04:00
emersion 58ac05c276
Merge branch 'master' into xwayland-dnd 2018-04-03 10:38:46 -04:00
emersion 1cd7ff7d3a
xwayland: use strndup in xwm_get_atom_name 2018-04-03 10:36:22 -04:00
emersion d7e03c7adc
xwayland: fix outgoing incr transfers 2018-04-03 10:25:50 -04:00
emersion 8f84c5b05f
xwayland: only send one target at a time 2018-04-03 00:44:04 -04:00
emersion 103e59703f
xwayland: improve xwm_selection_send_notify 2018-04-02 21:55:09 -04:00
Drew DeVault 506acbdecd Missed a spot 2018-04-02 20:57:09 -04:00
emersion 92b74071d0
xwayland: support multiple wayland → xwayland selection transfers
This fixes drag'n'drop support for Chromium.
2018-04-02 19:56:41 -04:00
emersion 8836b4f024
Merge branch 'master' into xwayland-dnd 2018-04-02 15:57:04 -04:00
emersion 692f1746cf
xwayland: specify xwm cursor stride in bytes 2018-03-31 00:22:58 -04:00
emersion 865b0aa123
xwayland: rename map_notify to map for consistency 2018-03-30 11:01:23 -04:00
emersion cadfccf1fd
xwayland: use a separate window for drag'n'drop 2018-03-29 17:53:47 -04:00
emersion 79dd4a0ff9
xwayland: receive DND_FINISHED 2018-03-29 12:11:30 -04:00
emersion ca2a73b90d
xwayland: allow drag data source transfer after drag ends 2018-03-29 11:40:19 -04:00
emersion 5dc5f446a8
xwayland: send drag'n'drop action to data source 2018-03-29 11:19:42 -04:00
emersion 6fd50947bd
xwayland: improve error handling 2018-03-28 21:36:53 -04:00
emersion 3effe153bc
xwayland: make wayland → xwayland work 2018-03-28 17:32:52 -04:00
emersion 30babb3865
xwayland: send DND_LEAVE 2018-03-28 16:26:45 -04:00
emersion e208f8dd8c
xwayland: fixes events not flushed causing issues with GTK apps 2018-03-28 16:06:49 -04:00
emersion bde859452d
xwayland: print names of unsupported properties and client messages 2018-03-28 15:45:15 -04:00
emersion 2a34b154e6
xwayland: send DND_DROP 2018-03-28 15:33:23 -04:00
emersion 73394deb76
xwayland: send DND_POSITION 2018-03-28 14:16:14 -04:00
emersion 0d7a81ccdf
xwayland: send DND_ENTER 2018-03-28 12:59:11 -04:00
emersion b6c1760de5
xwayland: create DND window, add DND atom helpers 2018-03-27 12:04:37 -04:00
emersion e78252adab
Fix segfault in xwm_read_data_source 2018-03-25 18:18:26 -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