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-16 06:29:08 +0300
committerCampbell Barton <campbell@blender.org>2022-06-16 07:18:45 +0300
commit9dd5c2a7ecc861707ef2987259ab2aff047a741a (patch)
tree144a6c010b9a54b424bb640ddaa195df002eae97 /intern/ghost/intern/GHOST_WindowWayland.cpp
parent1fed24de5a38c2133439e78cedc27d265962f90a (diff)
Fix error selecting the window scale in wayland
Regression in [0] caused all output to be considered when updating after monitor outputs changed. [0]: ac2a56d7f3d6d20a0ed24ece11eea33e23d42f2c
Diffstat (limited to 'intern/ghost/intern/GHOST_WindowWayland.cpp')
-rw-r--r--intern/ghost/intern/GHOST_WindowWayland.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/intern/ghost/intern/GHOST_WindowWayland.cpp b/intern/ghost/intern/GHOST_WindowWayland.cpp
index dc5719e3b94..7265fe83c69 100644
--- a/intern/ghost/intern/GHOST_WindowWayland.cpp
+++ b/intern/ghost/intern/GHOST_WindowWayland.cpp
@@ -28,7 +28,7 @@ struct window_t {
* This is an ordered set (whoever adds to this is responsible for keeping members unique).
* In practice this is rarely manipulated and is limited by the number of physical displays.
*/
- std::vector<const output_t *> outputs;
+ std::vector<output_t *> outputs;
/** The scale value written to #wl_surface_set_buffer_scale. */
int scale = 0;
@@ -233,7 +233,7 @@ static void surface_handle_enter(void *data,
if (reg_output == nullptr) {
return;
}
- std::vector<const output_t *> &outputs = w->outputs();
+ std::vector<output_t *> &outputs = w->outputs();
auto it = std::find(outputs.begin(), outputs.end(), reg_output);
if (it != outputs.end()) {
return;
@@ -252,7 +252,7 @@ static void surface_handle_leave(void *data,
if (reg_output == nullptr) {
return;
}
- std::vector<const output_t *> &outputs = w->outputs();
+ std::vector<output_t *> &outputs = w->outputs();
auto it = std::find(outputs.begin(), outputs.end(), reg_output);
if (it == outputs.end()) {
return;
@@ -408,7 +408,7 @@ wl_surface *GHOST_WindowWayland::surface() const
return w->wl_surface;
}
-std::vector<const output_t *> &GHOST_WindowWayland::outputs()
+std::vector<output_t *> &GHOST_WindowWayland::outputs()
{
return w->outputs;
}
@@ -426,7 +426,7 @@ output_t *GHOST_WindowWayland::output_find_by_wl(struct wl_output *output)
bool GHOST_WindowWayland::outputs_changed_update_scale()
{
uint32_t dpi_next;
- const int scale_next = outputs_max_scale_or_default(this->m_system->outputs(), 0, &dpi_next);
+ const int scale_next = outputs_max_scale_or_default(this->outputs(), 0, &dpi_next);
if (scale_next == 0) {
return false;
}