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
path: root/intern
diff options
context:
space:
mode:
authorCampbell Barton <campbell@blender.org>2022-07-15 08:42:24 +0300
committerCampbell Barton <campbell@blender.org>2022-07-15 08:42:24 +0300
commitd8094f9212c1703e6230825780c06beb630f6d19 (patch)
tree7fb03e97a8d205c8b6d2f155b96e33391ae613e1 /intern
parent60f260eb6a21a1bf7ef92ae2a09eb107bbcb0e4a (diff)
GHOST/Wayland: partial support for updating the UI scale
Partial support for changing the UI scale while Blender is open. The scale is set but issues with the window size not updating remain.
Diffstat (limited to 'intern')
-rw-r--r--intern/ghost/intern/GHOST_SystemWayland.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/intern/ghost/intern/GHOST_SystemWayland.cpp b/intern/ghost/intern/GHOST_SystemWayland.cpp
index 4124cd059b3..d7520f1243f 100644
--- a/intern/ghost/intern/GHOST_SystemWayland.cpp
+++ b/intern/ghost/intern/GHOST_SystemWayland.cpp
@@ -2597,7 +2597,17 @@ static void output_handle_done(void *data, struct wl_output * /*wl_output*/)
static void output_handle_scale(void *data, struct wl_output * /*wl_output*/, const int32_t factor)
{
+ CLOG_INFO(LOG, 2, "scale");
static_cast<output_t *>(data)->scale = factor;
+
+ if (window_manager) {
+ for (GHOST_IWindow *iwin : window_manager->getWindows()) {
+ GHOST_WindowWayland *win = static_cast<GHOST_WindowWayland *>(iwin);
+ win->outputs_changed_update_scale();
+ /* TODO(@campbellbarton): support refreshing the UI when the DPI changes.
+ * There are glitches when resizing the monitor which would be nice to solve. */
+ }
+ }
}
static const struct wl_output_listener output_listener = {