Skip to content

Commit c0ddf33

Browse files
jknockelmtwebster
authored andcommitted
meta-monitor-manager-xrandr.c: fix screen size
Only call meta_monitor_manager_xrandr_update_screen_size() when the CRTCs have been, if necessary, disabled. It is always safe and sometimes required to call it in this state. Previously, for instance, we would not call it in this state when shrinking the screen size (e.g., when in fractional "scale-up" mode), but it is in fact required to call it in this state when using fractional "scale-up" mode.
1 parent c522026 commit c0ddf33

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

src/backends/x11/meta-monitor-manager-xrandr.c

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -669,7 +669,7 @@ apply_crtc_assignments (MetaMonitorManager *manager,
669669
if (!n_crtcs)
670670
goto out;
671671

672-
if (width > manager->screen_width || height > manager->screen_height)
672+
if (width > 0 && height > 0)
673673
{
674674
meta_monitor_manager_xrandr_update_screen_size (manager_xrandr,
675675
width, height,
@@ -791,13 +791,6 @@ apply_crtc_assignments (MetaMonitorManager *manager,
791791
output->is_primary = FALSE;
792792
}
793793

794-
if (width > 0 && height > 0)
795-
{
796-
meta_monitor_manager_xrandr_update_screen_size (manager_xrandr,
797-
width, height,
798-
avg_screen_scale);
799-
}
800-
801794
out:
802795
XUngrabServer (manager_xrandr->xdisplay);
803796
XFlush (manager_xrandr->xdisplay);

0 commit comments

Comments
 (0)