Merge branch 'blender-v3.4-release'

This commit is contained in:
Campbell Barton 2022-11-12 17:10:25 +11:00
commit e87b99d7f3
3 changed files with 37 additions and 35 deletions

View File

@ -5990,7 +5990,7 @@ static bool cursor_is_software(const GHOST_TGrabCursorMode mode, const bool use_
return false;
}
GHOST_TSuccess GHOST_SystemWayland::setCursorShape(const GHOST_TStandardCursor shape)
GHOST_TSuccess GHOST_SystemWayland::cursor_shape_set(const GHOST_TStandardCursor shape)
{
GWL_Seat *seat = gwl_display_seat_active_get(display_);
if (UNLIKELY(!seat)) {
@ -6032,7 +6032,7 @@ GHOST_TSuccess GHOST_SystemWayland::setCursorShape(const GHOST_TStandardCursor s
return GHOST_kSuccess;
}
GHOST_TSuccess GHOST_SystemWayland::hasCursorShape(const GHOST_TStandardCursor cursorShape)
GHOST_TSuccess GHOST_SystemWayland::cursor_shape_check(const GHOST_TStandardCursor cursorShape)
{
auto cursor_find = ghost_wl_cursors.find(cursorShape);
if (cursor_find == ghost_wl_cursors.end()) {
@ -6045,13 +6045,13 @@ GHOST_TSuccess GHOST_SystemWayland::hasCursorShape(const GHOST_TStandardCursor c
return GHOST_kSuccess;
}
GHOST_TSuccess GHOST_SystemWayland::setCustomCursorShape(uint8_t *bitmap,
uint8_t *mask,
const int sizex,
const int sizey,
const int hotX,
const int hotY,
const bool /*canInvertColor*/)
GHOST_TSuccess GHOST_SystemWayland::cursor_shape_custom_set(uint8_t *bitmap,
uint8_t *mask,
const int sizex,
const int sizey,
const int hotX,
const int hotY,
const bool /*canInvertColor*/)
{
GWL_Seat *seat = gwl_display_seat_active_get(display_);
if (UNLIKELY(!seat)) {
@ -6121,7 +6121,7 @@ GHOST_TSuccess GHOST_SystemWayland::setCustomCursorShape(uint8_t *bitmap,
return GHOST_kSuccess;
}
GHOST_TSuccess GHOST_SystemWayland::getCursorBitmap(GHOST_CursorBitmapRef *bitmap)
GHOST_TSuccess GHOST_SystemWayland::cursor_bitmap_get(GHOST_CursorBitmapRef *bitmap)
{
GWL_Seat *seat = gwl_display_seat_active_get(display_);
if (UNLIKELY(!seat)) {
@ -6147,7 +6147,7 @@ GHOST_TSuccess GHOST_SystemWayland::getCursorBitmap(GHOST_CursorBitmapRef *bitma
return GHOST_kSuccess;
}
GHOST_TSuccess GHOST_SystemWayland::setCursorVisibility(const bool visible)
GHOST_TSuccess GHOST_SystemWayland::cursor_visibility_set(const bool visible)
{
GWL_Seat *seat = gwl_display_seat_active_get(display_);
if (UNLIKELY(!seat)) {
@ -6171,7 +6171,7 @@ bool GHOST_SystemWayland::supportsWindowPosition()
return false;
}
bool GHOST_SystemWayland::getCursorGrabUseSoftwareDisplay(const GHOST_TGrabCursorMode mode)
bool GHOST_SystemWayland::cursor_grab_use_software_display_get(const GHOST_TGrabCursorMode mode)
{
GWL_Seat *seat = gwl_display_seat_active_get(display_);
if (UNLIKELY(!seat)) {

View File

@ -137,26 +137,28 @@ class GHOST_SystemWayland : public GHOST_System {
const bool is_dialog,
const GHOST_IWindow *parentWindow) override;
GHOST_TSuccess setCursorShape(GHOST_TStandardCursor shape);
GHOST_TSuccess hasCursorShape(GHOST_TStandardCursor cursorShape);
GHOST_TSuccess setCustomCursorShape(uint8_t *bitmap,
uint8_t *mask,
int sizex,
int sizey,
int hotX,
int hotY,
bool canInvertColor);
GHOST_TSuccess getCursorBitmap(GHOST_CursorBitmapRef *bitmap);
GHOST_TSuccess setCursorVisibility(bool visible);
bool supportsCursorWarp() override;
bool supportsWindowPosition() override;
bool getCursorGrabUseSoftwareDisplay(const GHOST_TGrabCursorMode mode);
/* WAYLAND utility functions (share window/system logic). */
GHOST_TSuccess cursor_shape_set(GHOST_TStandardCursor shape);
GHOST_TSuccess cursor_shape_check(GHOST_TStandardCursor cursorShape);
GHOST_TSuccess cursor_shape_custom_set(uint8_t *bitmap,
uint8_t *mask,
int sizex,
int sizey,
int hotX,
int hotY,
bool canInvertColor);
GHOST_TSuccess cursor_bitmap_get(GHOST_CursorBitmapRef *bitmap);
GHOST_TSuccess cursor_visibility_set(bool visible);
bool cursor_grab_use_software_display_get(const GHOST_TGrabCursorMode mode);
/* WAYLAND direct-data access. */

View File

@ -435,7 +435,7 @@ static const struct wl_surface_listener wl_surface_listener = {
GHOST_TSuccess GHOST_WindowWayland::hasCursorShape(GHOST_TStandardCursor cursorShape)
{
return system_->hasCursorShape(cursorShape);
return system_->cursor_shape_check(cursorShape);
}
GHOST_WindowWayland::GHOST_WindowWayland(GHOST_SystemWayland *system,
@ -618,25 +618,25 @@ GHOST_TSuccess GHOST_WindowWayland::setWindowCursorGrab(GHOST_TGrabCursorMode mo
GHOST_TSuccess GHOST_WindowWayland::setWindowCursorShape(GHOST_TStandardCursor shape)
{
const GHOST_TSuccess ok = system_->setCursorShape(shape);
const GHOST_TSuccess ok = system_->cursor_shape_set(shape);
m_cursorShape = (ok == GHOST_kSuccess) ? shape : GHOST_kStandardCursorDefault;
return ok;
}
bool GHOST_WindowWayland::getCursorGrabUseSoftwareDisplay()
{
return system_->getCursorGrabUseSoftwareDisplay(m_cursorGrab);
return system_->cursor_grab_use_software_display_get(m_cursorGrab);
}
GHOST_TSuccess GHOST_WindowWayland::setWindowCustomCursorShape(
uint8_t *bitmap, uint8_t *mask, int sizex, int sizey, int hotX, int hotY, bool canInvertColor)
{
return system_->setCustomCursorShape(bitmap, mask, sizex, sizey, hotX, hotY, canInvertColor);
return system_->cursor_shape_custom_set(bitmap, mask, sizex, sizey, hotX, hotY, canInvertColor);
}
GHOST_TSuccess GHOST_WindowWayland::getCursorBitmap(GHOST_CursorBitmapRef *bitmap)
{
return system_->getCursorBitmap(bitmap);
return system_->cursor_bitmap_get(bitmap);
}
void GHOST_WindowWayland::setTitle(const char *title)
@ -754,7 +754,7 @@ uint16_t GHOST_WindowWayland::getDPIHint()
GHOST_TSuccess GHOST_WindowWayland::setWindowCursorVisibility(bool visible)
{
return system_->setCursorVisibility(visible);
return system_->cursor_visibility_set(visible);
}
GHOST_TSuccess GHOST_WindowWayland::setState(GHOST_TWindowState state)