1
0
Fork 0

wayland: Drop xdg-shell v6 protocol

There is no need to have this protocol as we already
have support for the xdg-shell stable.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2207>
This commit is contained in:
Fernando Monteiro 2022-04-22 16:35:34 +01:00
parent bb76d6fcc3
commit 11bc19fbe8
7 changed files with 4 additions and 2180 deletions

2
.gitignore vendored
View file

@ -56,8 +56,6 @@ src/gtk-primary-selection-protocol.c
src/gtk-primary-selection-server-protocol.h
src/gtk-shell-protocol.c
src/gtk-shell-server-protocol.h
src/xdg-shell-unstable-v*-protocol.c
src/xdg-shell-unstable-v*-server-protocol.h
src/pointer-gestures-unstable-v*-protocol.c
src/pointer-gestures-unstable-v*-server-protocol.h
src/relative-pointer-unstable-v*-protocol.c

View file

@ -579,8 +579,6 @@ if have_wayland
'wayland/meta-wayland-input-device.h',
'wayland/meta-wayland-keyboard.c',
'wayland/meta-wayland-keyboard.h',
'wayland/meta-wayland-legacy-xdg-shell.c',
'wayland/meta-wayland-legacy-xdg-shell.h',
'wayland/meta-wayland-outputs.c',
'wayland/meta-wayland-outputs.h',
'wayland/meta-wayland-pointer.c',
@ -923,7 +921,6 @@ if have_wayland
['xdg-activation', 'staging', 'v1', ],
['xdg-foreign', 'unstable', 'v1', ],
['xdg-output', 'unstable', 'v1', ],
['xdg-shell', 'unstable', 'v6', ],
['xdg-shell', 'stable', ],
['xwayland-keyboard-grab', 'unstable', 'v1', ],
]

File diff suppressed because it is too large Load diff

View file

@ -1,53 +0,0 @@
/*
* Copyright (C) 2013-2015 Red Hat, Inc.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
* 02111-1307, USA.
*/
#ifndef META_WAYLAND_LEGACY_XDG_SHELL_H
#define META_WAYLAND_LEGACY_XDG_SHELL_H
#include "wayland/meta-wayland-shell-surface.h"
#include "wayland/meta-wayland-surface.h"
#define META_TYPE_WAYLAND_ZXDG_SURFACE_V6 (meta_wayland_zxdg_surface_v6_get_type ())
G_DECLARE_DERIVABLE_TYPE (MetaWaylandZxdgSurfaceV6,
meta_wayland_zxdg_surface_v6,
META, WAYLAND_ZXDG_SURFACE_V6,
MetaWaylandShellSurface)
struct _MetaWaylandZxdgSurfaceV6Class
{
MetaWaylandShellSurfaceClass parent_class;
void (*shell_client_destroyed) (MetaWaylandZxdgSurfaceV6 *xdg_surface);
};
#define META_TYPE_WAYLAND_ZXDG_TOPLEVEL_V6 (meta_wayland_zxdg_toplevel_v6_get_type ())
G_DECLARE_FINAL_TYPE (MetaWaylandZxdgToplevelV6,
meta_wayland_zxdg_toplevel_v6,
META, WAYLAND_ZXDG_TOPLEVEL_V6,
MetaWaylandZxdgSurfaceV6);
#define META_TYPE_WAYLAND_ZXDG_POPUP_V6 (meta_wayland_zxdg_popup_v6_get_type ())
G_DECLARE_FINAL_TYPE (MetaWaylandZxdgPopupV6,
meta_wayland_zxdg_popup_v6,
META, WAYLAND_ZXDG_POPUP_V6,
MetaWaylandZxdgSurfaceV6);
void meta_wayland_legacy_xdg_shell_init (MetaWaylandCompositor *compositor);
#endif /* META_WAYLAND_LEGACY_XDG_SHELL_H */

View file

@ -41,7 +41,6 @@
#include "wayland/meta-wayland-data-device.h"
#include "wayland/meta-wayland-gtk-shell.h"
#include "wayland/meta-wayland-keyboard.h"
#include "wayland/meta-wayland-legacy-xdg-shell.h"
#include "wayland/meta-wayland-outputs.h"
#include "wayland/meta-wayland-pointer.h"
#include "wayland/meta-wayland-presentation-time-private.h"
@ -1577,7 +1576,6 @@ void
meta_wayland_shell_init (MetaWaylandCompositor *compositor)
{
meta_wayland_xdg_shell_init (compositor);
meta_wayland_legacy_xdg_shell_init (compositor);
meta_wayland_init_gtk_shell (compositor);
meta_wayland_init_viewporter (compositor);
}

View file

@ -38,7 +38,6 @@
#define META_WL_COMPOSITOR_VERSION 5
#define META_WL_DATA_DEVICE_MANAGER_VERSION 3
#define META_XDG_WM_BASE_VERSION 4
#define META_ZXDG_SHELL_V6_VERSION 1
#define META_WL_SEAT_VERSION 5
#define META_WL_OUTPUT_VERSION 2
#define META_XSERVER_VERSION 1

View file

@ -32,7 +32,6 @@
#include "wayland/meta-wayland-private.h"
#include "wayland/meta-wayland-versions.h"
#include "wayland/meta-wayland-xdg-shell.h"
#include "wayland/meta-wayland-legacy-xdg-shell.h"
#include "xdg-foreign-unstable-v1-server-protocol.h"
@ -145,9 +144,8 @@ xdg_exporter_export (struct wl_client *client,
char *handle;
if (!surface->role ||
!meta_wayland_surface_get_window (surface) ||
!(META_IS_WAYLAND_XDG_SURFACE (surface->role) ||
META_IS_WAYLAND_ZXDG_SURFACE_V6 (surface->role)))
!meta_wayland_surface_get_window (surface) ||
!META_IS_WAYLAND_XDG_SURFACE (surface->role))
{
wl_resource_post_error (resource,
WL_DISPLAY_ERROR_INVALID_OBJECT,
@ -253,8 +251,7 @@ is_valid_child (MetaWaylandSurface *surface)
if (!surface->role)
return FALSE;
if (!META_IS_WAYLAND_XDG_TOPLEVEL (surface->role) &&
!META_IS_WAYLAND_ZXDG_TOPLEVEL_V6 (surface->role))
if (!META_IS_WAYLAND_XDG_TOPLEVEL (surface->role))
return FALSE;
if (!meta_wayland_surface_get_window (surface))
@ -385,9 +382,7 @@ xdg_importer_import (struct wl_client *client,
xdg_imported_destructor);
exported = g_hash_table_lookup (foreign->exported_surfaces, handle);
if (!exported ||
(!META_IS_WAYLAND_XDG_SURFACE (exported->surface->role) &&
!META_IS_WAYLAND_ZXDG_SURFACE_V6 (exported->surface->role)))
if (!exported || !META_IS_WAYLAND_XDG_SURFACE (exported->surface->role))
{
zxdg_imported_v1_send_destroyed (xdg_imported_resource);
return;