Commit 9127087e authored by Jasper St. Pierre's avatar Jasper St. Pierre

wayland: Replace wl_shell_surface with xdg_shell

parent a4130513
......@@ -20,6 +20,8 @@ noinst_LTLIBRARIES = \
libgdk-wayland.la
BUILT_SOURCES = \
xdg-shell-client-protocol.h \
xdg-shell-protocol.c \
gtk-shell-client-protocol.h \
gtk-shell-protocol.c
......@@ -57,6 +59,8 @@ libgdkwaylandinclude_HEADERS = \
%-client-protocol.h : $(srcdir)/protocol/%.xml
$(AM_V_GEN)$(WAYLAND_SCANNER) client-header < $< > $@
EXTRA_DIST += protocol/gtk-shell.xml
EXTRA_DIST += \
protocol/xdg-shell.xml \
protocol/gtk-shell.xml
-include $(top_srcdir)/git.mk
......@@ -911,8 +911,6 @@ keyboard_handle_enter (void *data,
device, device->keyboard_focus));
_gdk_wayland_display_deliver_event (device->display, event);
_gdk_wayland_window_add_focus (device->keyboard_focus);
}
static void
......@@ -935,7 +933,6 @@ keyboard_handle_leave (void *data,
_gdk_wayland_display_update_serial (wayland_display, serial);
_gdk_wayland_window_remove_focus (device->keyboard_focus);
event = gdk_event_new (GDK_FOCUS_CHANGE);
event->focus_change.window = g_object_ref (device->keyboard_focus);
event->focus_change.send_event = FALSE;
......
......@@ -164,9 +164,9 @@ gdk_registry_handle_global(void *data, struct wl_registry *registry, uint32_t id
/* SHM interface is prerequisite */
_gdk_wayland_display_load_cursor_theme(display_wayland);
} else if (strcmp(interface, "wl_shell") == 0) {
display_wayland->shell =
wl_registry_bind(display_wayland->wl_registry, id, &wl_shell_interface, 1);
} else if (strcmp(interface, "xdg_shell") == 0) {
display_wayland->xdg_shell =
wl_registry_bind(display_wayland->wl_registry, id, &xdg_shell_interface, 1);
} else if (strcmp(interface, "gtk_shell") == 0) {
display_wayland->gtk_shell =
wl_registry_bind(display_wayland->wl_registry, id, &gtk_shell_interface, 1);
......@@ -728,21 +728,21 @@ gdk_wayland_display_get_wl_compositor (GdkDisplay *display)
}
/**
* gdk_wayland_display_get_wl_shell
* gdk_wayland_display_get_xdg_shell
* @display: (type GdkWaylandDisplay): a #GdkDisplay
*
* Returns the Wayland global singleton shell of a #GdkDisplay
*
* Returns: (transfer none): a Wayland wl_shell
* Returns: (transfer none): a Wayland xdg_shell
*
* Since: 3.8
*/
struct wl_shell *
gdk_wayland_display_get_wl_shell (GdkDisplay *display)
struct xdg_shell *
gdk_wayland_display_get_xdg_shell (GdkDisplay *display)
{
GdkWaylandDisplay *wayland_display = GDK_WAYLAND_DISPLAY(display);
g_return_val_if_fail (GDK_IS_WAYLAND_DISPLAY(display), NULL);
return wayland_display->shell;
return wayland_display->xdg_shell;
}
......@@ -27,6 +27,7 @@
#include <wayland-client.h>
#include <wayland-cursor.h>
#include <gdk/wayland/gtk-shell-client-protocol.h>
#include <gdk/wayland/xdg-shell-client-protocol.h>
#include <glib.h>
#include <gdk/gdkkeys.h>
......@@ -58,7 +59,7 @@ struct _GdkWaylandDisplay
struct wl_registry *wl_registry;
struct wl_compositor *compositor;
struct wl_shm *shm;
struct wl_shell *shell;
struct xdg_shell *xdg_shell;
struct gtk_shell *gtk_shell;
struct wl_input_device *input_device;
struct wl_data_device_manager *data_device_manager;
......
......@@ -42,9 +42,6 @@
#define GDK_WINDOW_IS_WAYLAND(win) (GDK_IS_WINDOW_IMPL_WAYLAND (((GdkWindow *)win)->impl))
void _gdk_wayland_window_add_focus (GdkWindow *window);
void _gdk_wayland_window_remove_focus (GdkWindow *window);
GdkKeymap *_gdk_wayland_keymap_new (void);
void _gdk_wayland_keymap_update_from_fd (GdkKeymap *keymap,
uint32_t format,
......
......@@ -47,8 +47,6 @@ GType gdk_wayland_window_get_type (void);
GDK_AVAILABLE_IN_ALL
struct wl_surface *gdk_wayland_window_get_wl_surface (GdkWindow *window);
GDK_AVAILABLE_IN_ALL
struct wl_shell_surface *gdk_wayland_window_get_wl_shell_surface (GdkWindow *window);
GDK_AVAILABLE_IN_ALL
void gdk_wayland_window_set_use_custom_surface (GdkWindow *window);
......
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment