|
@@ -497,6 +497,12 @@ void WaylandThread::_wl_registry_on_global(void *data, struct wl_registry *wl_re
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ if (strcmp(interface, xdg_system_bell_v1_interface.name) == 0) {
|
|
|
|
+ registry->xdg_system_bell = (struct xdg_system_bell_v1 *)wl_registry_bind(wl_registry, name, &xdg_system_bell_v1_interface, 1);
|
|
|
|
+ registry->xdg_system_bell_name = name;
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+
|
|
if (strcmp(interface, xdg_activation_v1_interface.name) == 0) {
|
|
if (strcmp(interface, xdg_activation_v1_interface.name) == 0) {
|
|
registry->xdg_activation = (struct xdg_activation_v1 *)wl_registry_bind(wl_registry, name, &xdg_activation_v1_interface, 1);
|
|
registry->xdg_activation = (struct xdg_activation_v1 *)wl_registry_bind(wl_registry, name, &xdg_activation_v1_interface, 1);
|
|
registry->xdg_activation_name = name;
|
|
registry->xdg_activation_name = name;
|
|
@@ -692,6 +698,17 @@ void WaylandThread::_wl_registry_on_global_remove(void *data, struct wl_registry
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ if (name == registry->xdg_system_bell_name) {
|
|
|
|
+ if (registry->xdg_system_bell) {
|
|
|
|
+ xdg_system_bell_v1_destroy(registry->xdg_system_bell);
|
|
|
|
+ registry->xdg_system_bell = nullptr;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ registry->xdg_system_bell_name = 0;
|
|
|
|
+
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+
|
|
if (name == registry->xdg_activation_name) {
|
|
if (name == registry->xdg_activation_name) {
|
|
if (registry->xdg_activation) {
|
|
if (registry->xdg_activation) {
|
|
xdg_activation_v1_destroy(registry->xdg_activation);
|
|
xdg_activation_v1_destroy(registry->xdg_activation);
|
|
@@ -3282,6 +3299,12 @@ struct wl_surface *WaylandThread::window_get_wl_surface(DisplayServer::WindowID
|
|
return ws.wl_surface;
|
|
return ws.wl_surface;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+void WaylandThread::beep() const {
|
|
|
|
+ if (registry.xdg_system_bell) {
|
|
|
|
+ xdg_system_bell_v1_ring(registry.xdg_system_bell, nullptr);
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+
|
|
void WaylandThread::window_set_max_size(DisplayServer::WindowID p_window_id, const Size2i &p_size) {
|
|
void WaylandThread::window_set_max_size(DisplayServer::WindowID p_window_id, const Size2i &p_size) {
|
|
// TODO: Use window IDs for multiwindow support.
|
|
// TODO: Use window IDs for multiwindow support.
|
|
WindowState &ws = main_window;
|
|
WindowState &ws = main_window;
|
|
@@ -4364,6 +4387,10 @@ void WaylandThread::destroy() {
|
|
xdg_activation_v1_destroy(registry.xdg_activation);
|
|
xdg_activation_v1_destroy(registry.xdg_activation);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ if (registry.xdg_system_bell) {
|
|
|
|
+ xdg_system_bell_v1_destroy(registry.xdg_system_bell);
|
|
|
|
+ }
|
|
|
|
+
|
|
if (registry.xdg_decoration_manager) {
|
|
if (registry.xdg_decoration_manager) {
|
|
zxdg_decoration_manager_v1_destroy(registry.xdg_decoration_manager);
|
|
zxdg_decoration_manager_v1_destroy(registry.xdg_decoration_manager);
|
|
}
|
|
}
|