Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <campbell@blender.org>2022-06-24 02:58:27 +0300
committerCampbell Barton <campbell@blender.org>2022-06-24 02:58:27 +0300
commitb3a713fffa3928e1692cf5b1354728d0feaf4c77 (patch)
tree9c3f506e4fc0c6782579f9658f773ef5a703f610 /intern/ghost/intern/GHOST_WindowWayland.cpp
parent9b5dda3b07496bda28970dfd23e4951a76d0f8ed (diff)
Cleanup: use const arguments for GHOST/Wayland
Diffstat (limited to 'intern/ghost/intern/GHOST_WindowWayland.cpp')
-rw-r--r--intern/ghost/intern/GHOST_WindowWayland.cpp31
1 files changed, 18 insertions, 13 deletions
diff --git a/intern/ghost/intern/GHOST_WindowWayland.cpp b/intern/ghost/intern/GHOST_WindowWayland.cpp
index 01dd9721f2b..394ad35082b 100644
--- a/intern/ghost/intern/GHOST_WindowWayland.cpp
+++ b/intern/ghost/intern/GHOST_WindowWayland.cpp
@@ -120,8 +120,11 @@ static int outputs_max_scale_or_default(const std::vector<output_t *> &outputs,
/** \name Listener (XDG Top Level), #xdg_toplevel_listener
* \{ */
-static void xdg_toplevel_handle_configure(
- void *data, xdg_toplevel * /*xdg_toplevel*/, int32_t width, int32_t height, wl_array *states)
+static void xdg_toplevel_handle_configure(void *data,
+ xdg_toplevel * /*xdg_toplevel*/,
+ const int32_t width,
+ const int32_t height,
+ wl_array *states)
{
window_t *win = static_cast<window_t *>(data);
win->size_pending[0] = win->scale * width;
@@ -172,7 +175,7 @@ static const xdg_toplevel_listener toplevel_listener = {
static void xdg_toplevel_decoration_handle_configure(
void *data,
struct zxdg_toplevel_decoration_v1 * /*zxdg_toplevel_decoration_v1*/,
- uint32_t mode)
+ const uint32_t mode)
{
static_cast<window_t *>(data)->decoration_mode = zxdg_toplevel_decoration_v1_mode(mode);
}
@@ -187,7 +190,9 @@ static const zxdg_toplevel_decoration_v1_listener toplevel_decoration_v1_listene
/** \name Listener (XDG Surface Handle Configure), #xdg_surface_listener
* \{ */
-static void xdg_surface_handle_configure(void *data, xdg_surface *xdg_surface, uint32_t serial)
+static void xdg_surface_handle_configure(void *data,
+ xdg_surface *xdg_surface,
+ const uint32_t serial)
{
window_t *win = static_cast<window_t *>(data);
@@ -274,13 +279,13 @@ GHOST_TSuccess GHOST_WindowWayland::hasCursorShape(GHOST_TStandardCursor cursorS
GHOST_WindowWayland::GHOST_WindowWayland(GHOST_SystemWayland *system,
const char *title,
- int32_t /*left*/,
- int32_t /*top*/,
- uint32_t width,
- uint32_t height,
- GHOST_TWindowState state,
+ const int32_t /*left*/,
+ const int32_t /*top*/,
+ const uint32_t width,
+ const uint32_t height,
+ const GHOST_TWindowState state,
const GHOST_IWindow *parentWindow,
- GHOST_TDrawingContextType type,
+ const GHOST_TDrawingContextType type,
const bool is_dialog,
const bool stereoVisual,
const bool exclusive)
@@ -530,17 +535,17 @@ void GHOST_WindowWayland::getClientBounds(GHOST_Rect &bounds) const
bounds.set(0, 0, w->size[0], w->size[1]);
}
-GHOST_TSuccess GHOST_WindowWayland::setClientWidth(uint32_t width)
+GHOST_TSuccess GHOST_WindowWayland::setClientWidth(const uint32_t width)
{
return setClientSize(width, uint32_t(w->size[1]));
}
-GHOST_TSuccess GHOST_WindowWayland::setClientHeight(uint32_t height)
+GHOST_TSuccess GHOST_WindowWayland::setClientHeight(const uint32_t height)
{
return setClientSize(uint32_t(w->size[0]), height);
}
-GHOST_TSuccess GHOST_WindowWayland::setClientSize(uint32_t width, uint32_t height)
+GHOST_TSuccess GHOST_WindowWayland::setClientSize(const uint32_t width, const uint32_t height)
{
wl_egl_window_resize(w->egl_window, int(width), int(height), 0, 0);