[Bf-blender-cvs] [4c5f4293f85] decoration: remove xdg surfaces

Christian Rauch noreply at git.blender.org
Sun May 24 01:15:28 CEST 2020


Commit: 4c5f4293f8522cca58ed5f9f70925096b8f17639
Author: Christian Rauch
Date:   Thu May 21 00:24:10 2020 +0100
Branches: decoration
https://developer.blender.org/rB4c5f4293f8522cca58ed5f9f70925096b8f17639

remove xdg surfaces

===================================================================

M	intern/ghost/CMakeLists.txt
M	intern/ghost/intern/GHOST_SystemWayland.cpp
M	intern/ghost/intern/GHOST_SystemWayland.h

===================================================================

diff --git a/intern/ghost/CMakeLists.txt b/intern/ghost/CMakeLists.txt
index 2999a64fdea..571f29c8110 100644
--- a/intern/ghost/CMakeLists.txt
+++ b/intern/ghost/CMakeLists.txt
@@ -299,11 +299,11 @@ elseif(WITH_GHOST_X11 OR WITH_GHOST_WAYLAND)
       ${CMAKE_CURRENT_BINARY_DIR}
     )
 
-    # xdg-shell.
-    generate_protocol_bindings(
-      xdg-shell
-      "${WAYLAND_PROTOCOLS_DIR}/stable/xdg-shell/xdg-shell.xml"
-    )
+#    # xdg-shell.
+#    generate_protocol_bindings(
+#      xdg-shell
+#      "${WAYLAND_PROTOCOLS_DIR}/stable/xdg-shell/xdg-shell.xml"
+#    )
     # Pointer-constraints.
     generate_protocol_bindings(
       pointer-constraints
diff --git a/intern/ghost/intern/GHOST_SystemWayland.cpp b/intern/ghost/intern/GHOST_SystemWayland.cpp
index 998f0cc3678..7014b04ae2c 100644
--- a/intern/ghost/intern/GHOST_SystemWayland.cpp
+++ b/intern/ghost/intern/GHOST_SystemWayland.cpp
@@ -141,7 +141,6 @@ struct display_t {
 
   struct wl_display *display;
   struct wl_compositor *compositor = nullptr;
-  struct xdg_wm_base *xdg_shell = nullptr;
   struct wl_shm *shm = nullptr;
   std::vector<output_t *> outputs;
   std::vector<input_t *> inputs;
@@ -238,9 +237,9 @@ static void display_destroy(display_t *d)
     wl_compositor_destroy(d->compositor);
   }
 
-  if (d->xdg_shell) {
-    xdg_wm_base_destroy(d->xdg_shell);
-  }
+//  if (d->xdg_shell) {
+//    xdg_wm_base_destroy(d->xdg_shell);
+//  }
 
   if (eglGetDisplay) {
     ::eglTerminate(eglGetDisplay(EGLNativeDisplayType(d->display)));
@@ -1210,14 +1209,14 @@ static const struct wl_output_listener output_listener = {
     output_scale,
 };
 
-static void shell_ping(void * /*data*/, struct xdg_wm_base *xdg_wm_base, uint32_t serial)
-{
-  xdg_wm_base_pong(xdg_wm_base, serial);
-}
+//static void shell_ping(void * /*data*/, struct xdg_wm_base *xdg_wm_base, uint32_t serial)
+//{
+//  xdg_wm_base_pong(xdg_wm_base, serial);
+//}
 
-static const struct xdg_wm_base_listener shell_listener = {
-    shell_ping,
-};
+//static const struct xdg_wm_base_listener shell_listener = {
+//    shell_ping,
+//};
 
 static void global_add(void *data,
                        struct wl_registry *wl_registry,
@@ -1230,11 +1229,11 @@ static void global_add(void *data,
     display->compositor = static_cast<wl_compositor *>(
         wl_registry_bind(wl_registry, name, &wl_compositor_interface, 1));
   }
-  else if (!strcmp(interface, xdg_wm_base_interface.name)) {
-    display->xdg_shell = static_cast<xdg_wm_base *>(
-        wl_registry_bind(wl_registry, name, &xdg_wm_base_interface, 1));
-    xdg_wm_base_add_listener(display->xdg_shell, &shell_listener, nullptr);
-  }
+//  else if (!strcmp(interface, xdg_wm_base_interface.name)) {
+//    display->xdg_shell = static_cast<xdg_wm_base *>(
+//        wl_registry_bind(wl_registry, name, &xdg_wm_base_interface, 1));
+//    xdg_wm_base_add_listener(display->xdg_shell, &shell_listener, nullptr);
+//  }
   else if (!strcmp(interface, wl_output_interface.name)) {
     output_t *output = new output_t;
     output->scale = 1;
@@ -1323,10 +1322,10 @@ GHOST_SystemWayland::GHOST_SystemWayland() : GHOST_System(), d(new display_t)
   wl_display_roundtrip(d->display);
   wl_registry_destroy(registry);
 
-  if (!d->xdg_shell) {
-    display_destroy(d);
-    throw std::runtime_error("Wayland: unable to access xdg_shell!");
-  }
+//  if (!d->xdg_shell) {
+//    display_destroy(d);
+//    throw std::runtime_error("Wayland: unable to access xdg_shell!");
+//  }
 
   /* Register data device per seat for IPC between Wayland clients. */
   if (d->data_device_manager) {
@@ -1569,10 +1568,10 @@ wl_compositor *GHOST_SystemWayland::compositor()
   return d->compositor;
 }
 
-xdg_wm_base *GHOST_SystemWayland::shell()
-{
-  return d->xdg_shell;
-}
+//xdg_wm_base *GHOST_SystemWayland::shell()
+//{
+//  return d->xdg_shell;
+//}
 
 void GHOST_SystemWayland::setSelection(const std::string &selection)
 {
diff --git a/intern/ghost/intern/GHOST_SystemWayland.h b/intern/ghost/intern/GHOST_SystemWayland.h
index 89cd3406b69..fb67489ee3b 100644
--- a/intern/ghost/intern/GHOST_SystemWayland.h
+++ b/intern/ghost/intern/GHOST_SystemWayland.h
@@ -27,7 +27,7 @@
 #include "GHOST_WindowWayland.h"
 
 #include <wayland-client.h>
-#include <xdg-shell-client-protocol.h>
+//#include <xdg-shell-client-protocol.h>
 
 #include <string>
 
@@ -83,7 +83,7 @@ class GHOST_SystemWayland : public GHOST_System {
 
   wl_compositor *compositor();
 
-  xdg_wm_base *shell();
+//  xdg_wm_base *shell();
 
   void setSelection(const std::string &selection);



More information about the Bf-blender-cvs mailing list