Merge branch 'blender-v3.4-release'

This commit is contained in:
Campbell Barton 2022-11-16 21:37:01 +11:00
commit ec9acdeac2
2 changed files with 11 additions and 3 deletions

View File

@ -2595,7 +2595,7 @@ static void pointer_handle_enter(void *data,
seat->system->seat_active_set(seat);
win->setCursorShape(win->getCursorShape());
seat->system->cursor_shape_set(win->getCursorShape());
const wl_fixed_t scale = win->scale();
seat->system->pushEvent_maybe_pending(
@ -3257,7 +3257,7 @@ static void tablet_tool_handle_proximity_in(void *data,
win->activate();
win->setCursorShape(win->getCursorShape());
seat->system->cursor_shape_set(win->getCursorShape());
}
static void tablet_tool_handle_proximity_out(void *data,
struct zwp_tablet_tool_v2 * /*zwp_tablet_tool_v2*/)
@ -3456,7 +3456,7 @@ static void tablet_tool_handle_frame(void *data,
wl_fixed_to_int(scale * seat->tablet.xy[1]),
tablet_tool->data));
if (tablet_tool->proximity == false) {
win->setCursorShape(win->getCursorShape());
seat->system->cursor_shape_set(win->getCursorShape());
}
}

View File

@ -966,6 +966,9 @@ GHOST_TSuccess GHOST_WindowWayland::setWindowCursorGrab(GHOST_TGrabCursorMode mo
GHOST_TSuccess GHOST_WindowWayland::setWindowCursorShape(GHOST_TStandardCursor shape)
{
#ifdef USE_EVENT_BACKGROUND_THREAD
std::lock_guard lock_server_guard{*system_->server_mutex};
#endif
const GHOST_TSuccess ok = system_->cursor_shape_set(shape);
m_cursorShape = (ok == GHOST_kSuccess) ? shape : GHOST_kStandardCursorDefault;
return ok;
@ -1006,6 +1009,7 @@ void GHOST_WindowWayland::setTitle(const char *title)
std::string GHOST_WindowWayland::getTitle() const
{
/* No need to lock `server_mutex` (WAYLAND never changes this). */
return window_->title.empty() ? "untitled" : window_->title;
}
@ -1016,6 +1020,7 @@ void GHOST_WindowWayland::getWindowBounds(GHOST_Rect &bounds) const
void GHOST_WindowWayland::getClientBounds(GHOST_Rect &bounds) const
{
/* No need to lock `server_mutex` (WAYLAND never changes this in a thread). */
bounds.set(0, 0, UNPACK2(window_->frame.size));
}
@ -1098,6 +1103,9 @@ GHOST_WindowWayland::~GHOST_WindowWayland()
uint16_t GHOST_WindowWayland::getDPIHint()
{
/* No need to lock `server_mutex`
* (`outputs_changed_update_scale` never changes values in a non-main thread). */
/* Using the physical DPI will cause wrong scaling of the UI
* use a multiplier for the default DPI as a workaround. */
return wl_fixed_to_int(window_->scale_fractional * base_dpi);