diff options
author | Xavier Hallade <xavier.hallade@intel.com> | 2022-06-29 12:08:03 +0300 |
---|---|---|
committer | Xavier Hallade <xavier.hallade@intel.com> | 2022-06-29 12:08:03 +0300 |
commit | 45feeabe7ed3863074bb824e59b982301656622d (patch) | |
tree | f590a244cf0f34e8e0a1a7e54dab6587247f7b75 | |
parent | 7901f54b82b70cd97c5acea04c4d2a7e3527285c (diff) | |
parent | 43b65150ed3853e6f40b0236b548393eb029c123 (diff) |
Merge branch 'master' into cycles_oneapi
-rw-r--r-- | intern/ghost/intern/GHOST_SystemWayland.cpp | 10 | ||||
-rw-r--r-- | intern/ghost/intern/GHOST_WindowWayland.cpp | 4 | ||||
-rw-r--r-- | intern/mantaflow/intern/MANTA_main.cpp | 6 | ||||
-rw-r--r-- | source/blender/windowmanager/intern/wm_window.c | 10 |
4 files changed, 22 insertions, 8 deletions
diff --git a/intern/ghost/intern/GHOST_SystemWayland.cpp b/intern/ghost/intern/GHOST_SystemWayland.cpp index d45962817c1..36c9421f596 100644 --- a/intern/ghost/intern/GHOST_SystemWayland.cpp +++ b/intern/ghost/intern/GHOST_SystemWayland.cpp @@ -49,6 +49,8 @@ static GHOST_WindowWayland *window_from_surface(struct wl_surface *surface); static void keyboard_handle_key_repeat_cancel(struct input_t *input); +static void output_handle_done(void *data, struct wl_output *wl_output); + /** * GNOME (mutter 42.2 had a bug with confine not respecting scale - Hi-DPI), See: T98793. * Even though this has been fixed, at time of writing it's not yet in a release. @@ -2205,10 +2207,14 @@ static void xdg_output_handle_logical_size(void *data, output->has_size_logical = true; } -static void xdg_output_handle_done(void * /*data*/, struct zxdg_output_v1 * /*xdg_output*/) +static void xdg_output_handle_done(void *data, struct zxdg_output_v1 * /*xdg_output*/) { /* NOTE: `xdg-output.done` events are deprecated and only apply below version 3 of the protocol. * `wl-output.done` event will be emitted in version 3 or higher. */ + output_t *output = static_cast<output_t *>(data); + if (zxdg_output_v1_get_version(output->xdg_output) < 3) { + output_handle_done(data, output->wl_output); + } } static void xdg_output_handle_name(void * /*data*/, @@ -2404,7 +2410,7 @@ static void global_handle_add(void *data, #endif /* !WITH_GHOST_WAYLAND_LIBDECOR. */ else if (!strcmp(interface, zxdg_output_manager_v1_interface.name)) { display->xdg_output_manager = static_cast<zxdg_output_manager_v1 *>( - wl_registry_bind(wl_registry, name, &zxdg_output_manager_v1_interface, 3)); + wl_registry_bind(wl_registry, name, &zxdg_output_manager_v1_interface, 2)); for (output_t *output : display->outputs) { output->xdg_output = zxdg_output_manager_v1_get_xdg_output(display->xdg_output_manager, output->wl_output); diff --git a/intern/ghost/intern/GHOST_WindowWayland.cpp b/intern/ghost/intern/GHOST_WindowWayland.cpp index 1f358748ee9..a1936d3667c 100644 --- a/intern/ghost/intern/GHOST_WindowWayland.cpp +++ b/intern/ghost/intern/GHOST_WindowWayland.cpp @@ -449,6 +449,8 @@ GHOST_WindowWayland::GHOST_WindowWayland(GHOST_SystemWayland *system, #endif /* !WITH_GHOST_WAYLAND_LIBDECOR */ + setTitle(title); + wl_surface_set_user_data(w->wl_surface, this); /* Call top-level callbacks. */ @@ -473,8 +475,6 @@ GHOST_WindowWayland::GHOST_WindowWayland(GHOST_SystemWayland *system, setState(state); #endif - setTitle(title); - /* EGL context. */ if (setDrawingContextType(type) == GHOST_kFailure) { GHOST_PRINT("Failed to create EGL context" << std::endl); diff --git a/intern/mantaflow/intern/MANTA_main.cpp b/intern/mantaflow/intern/MANTA_main.cpp index f1bdc10e7f9..fc14c909f4d 100644 --- a/intern/mantaflow/intern/MANTA_main.cpp +++ b/intern/mantaflow/intern/MANTA_main.cpp @@ -562,7 +562,13 @@ MANTA::~MANTA() pythonCommands.push_back(finalString); result = runPythonString(pythonCommands); + /* WARNING: this causes crash on exit in the `cycles_volume_cpu/smoke_color` test, + * freeing a single modifier ends up clearing the shared module. + * For this to be handled properly there would need to be a initialize/free + * function for global data. */ +#if 0 MANTA::terminateMantaflow(); +#endif BLI_assert(result); UNUSED_VARS(result); diff --git a/source/blender/windowmanager/intern/wm_window.c b/source/blender/windowmanager/intern/wm_window.c index 3ea3ec2b70b..baf137e6665 100644 --- a/source/blender/windowmanager/intern/wm_window.c +++ b/source/blender/windowmanager/intern/wm_window.c @@ -1116,7 +1116,6 @@ static bool ghost_event_proc(GHOST_EventHandle evt, GHOST_TUserDataPtr C_void_pt break; case GHOST_kEventWindowActivate: { - GHOST_TEventKeyData kdata; const int keymodifier = ((query_qual(SHIFT) ? KM_SHIFT : 0) | (query_qual(CONTROL) ? KM_CTRL : 0) | (query_qual(ALT) ? KM_ALT : 0) | (query_qual(OS) ? KM_OSKEY : 0)); @@ -1139,9 +1138,12 @@ static bool ghost_event_proc(GHOST_EventHandle evt, GHOST_TUserDataPtr C_void_pt * * For now don't send GHOST_kEventKeyDown events, just set the 'eventstate'. */ - kdata.ascii = '\0'; - kdata.utf8_buf[0] = '\0'; - + GHOST_TEventKeyData kdata = { + .key = GHOST_kKeyUnknown, + .ascii = '\0', + .utf8_buf = {'\0'}, + .is_repeat = false, + }; if (win->eventstate->modifier & KM_SHIFT) { if ((keymodifier & KM_SHIFT) == 0) { kdata.key = GHOST_kKeyLeftShift; |