Commit Graph

13 Commits

Author SHA1 Message Date
Michael Tretter 48b39d31ef shared: extract hash table implementation from xwayland
The hash table implementation is useful for other modules as well. Move it from
xwayland to the shared code.

Signed-off-by: Michael Tretter <m.tretter@pengutronix.de>
2023-03-03 08:08:46 +00:00
shierote f2d6d21eec libweston: correct argument name in the handler of wl_data_source.accept
Signed-off-by: Taishi Eguchi <taishi2060@gmail.com>
2022-04-14 12:05:57 +00:00
Derek Foreman c00aba6893 xwayland: Fix copy and paste error
This leg of the if/else ladder is a duplicate of the previous conditional.

It appears to have been intended to log enter events, but we already
handle those earlier. The drop event is already logged as well,
so let's just discard this branch entirely.

Fixes #552

Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
2021-10-25 17:24:41 -05:00
Pekka Paalanen acf84fd29f xwm: dnd does not need cairo-util.h
Turns out dnd.c does not actually need cairo-util.h. This was found when
unifying the include directives of all shared/ headers. Removing this makes one
less place to fix.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2019-10-04 15:56:19 +03:00
Pekka Paalanen 3d5d9476e3 Rename compositor.h to libweston/libweston.h
The main idea is to make libweston users use the form

 #include <libweston/libweston.h>

instead of the plain

 #include <compositor.h>

which is prone to name conflicts. This is reflected both in the installed
files, and the internal header search paths so that Weston would use the exact
same form as an external project using libweston would.

The public headers are moved under a new top-level directory include/ to make
them clearly stand out as special (public API).

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2019-04-18 12:31:46 +03:00
Carlos Garnacho 11f8fcbefe xwayland: Create the drag-and-drop window in weston_wm_dnd_init
Just to keep it hidden so far... A lot of the plumbing necessary to
handle x11->wayland drag and drop is missing, and the current
partial handling gets in the middle for X11 drag-and-drop itself
to work.

The approach is well directed, but needs some further work, till
then, just keep our fake drag-and-drop target hidden. This allows
drag-and-drop to work between X11 clients in Xwayland, and avoids
a crash with (currently unhandled) wl_resource-less data sources.

Fixes https://bugs.freedesktop.org/show_bug.cgi?id=94218

Signed-off-by: Carlos Garnacho <carlosg@gnome.org>
Reviewed-by: Daniel Stone <daniels@collabora.com>
2016-11-22 12:01:37 +00:00
Daniel Stone 67fe3dbdd0 xwayland: Move includes to avoid deprecation warnings
compositor.h already helpfully defines WL_HIDE_DEPRECATED for us, so we
don't get warnings about wl_buffer (in particular) being deprecated when
we have wayland-server headers defining it as deprecated, and then
wayland-client headers using the type.

Move it to be before all our other includes, so we actually make use of
it.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Yong Bakos <ybakos@humanoriented.com>
Tested-by: Yong Bakos <ybakos@humanoriented.com>
2016-11-01 17:02:38 +00:00
Jussi Kukkonen 649bbce607 include stdint.h for int32_t/uint32_t
Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
Reviewed-by: Yong Bakos <ybakos@humanoriented.com>
2016-07-26 16:26:08 -07:00
Carlos Garnacho beb7a9f92d xwayland: zalloc the x11_data_sources
The wrapped weston_data_source struct has new fields which were left
uninitialized, so its access is unreliable.

The data source in xwayland/dnd.c should be eventually setting the
drag-and-drop actions, but it is a lot more incomplete than that
(read: completely), so falls out of the scope of this patch.

Signed-off-by: Carlos Garnacho <carlosg@gnome.org>
2016-02-01 13:22:33 -08:00
Derek Foreman 1281a36e3b input: Don't test keyboard/pointer/touch pointers
Keyboards and pointers aren't freed when devices are removed, so we should
really be testing keyboard_device_count and pointer_device_count in most
cases, not the actual pointers. Otherwise we end up with different
behaviour after removing a device than we had before it was inserted.

This commit renames the touch/keyboard/pointer pointers and adds helper
functions to get them that hide this complexity and return NULL when
*_device_count is 0.

Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
2015-07-31 15:16:09 -07:00
Bryce Harrington 0a007dd21a xwayland: Update boilerplate from MIT X11 license to MIT Expat license 2015-06-15 13:04:19 -07:00
Mariusz Ceier d7fb309dd0 Don't include xserver-server-protocol.h
It was removed in 757d8aff27,
along with xserver protocol.

Signed-off-by: Mariusz Ceier <mceier+wayland@gmail.com>
2014-04-07 09:46:27 -07:00
Kristian Høgsberg 2ba10df300 Move xwayland up one directory level 2013-12-04 10:20:02 -08:00