[gnome-control-center/benzea/display-snap-after-changes: 8/9] display: Run snapping after certain modifications
- From: Benjamin Berg <bberg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center/benzea/display-snap-after-changes: 8/9] display: Run snapping after certain modifications
- Date: Wed, 24 Oct 2018 08:36:42 +0000 (UTC)
commit 32a6f9befa213c0fadbf32be4b71157d1b6078ce
Author: Benjamin Berg <bberg redhat com>
Date: Tue Oct 23 23:16:55 2018 +0200
display: Run snapping after certain modifications
Anything that affects the size of the screen (or its existance) may
result in invalid configurations. Do a small effort in trying to fix
this by calling into the snapping algorithm for the modified monitor.
Addresses issue #247 to a large extend.
panels/display/cc-display-panel.c | 5 +++++
1 file changed, 5 insertions(+)
---
diff --git a/panels/display/cc-display-panel.c b/panels/display/cc-display-panel.c
index 4261653d7..2c6bf85e3 100644
--- a/panels/display/cc-display-panel.c
+++ b/panels/display/cc-display-panel.c
@@ -553,6 +553,7 @@ orientation_row_activated (CcDisplayPanel *panel,
CcDisplayRotation rotation = GPOINTER_TO_UINT (g_object_get_data (G_OBJECT (row), "rotation"));
cc_display_monitor_set_rotation (panel->current_output, rotation);
+ cc_display_config_snap_output (panel->current_config, panel->current_output);
update_apply_button (panel);
}
@@ -647,6 +648,7 @@ resolution_row_activated (CcDisplayPanel *panel,
if (!display_mode_supported_at_scale (mode, scale))
cc_display_monitor_set_scale (panel->current_output, 1.0);
+ cc_display_config_snap_output (panel->current_config, panel->current_output);
update_apply_button (panel);
}
@@ -855,6 +857,7 @@ scale_buttons_active (CcDisplayPanel *panel,
if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (button)))
{
cc_display_monitor_set_scale (panel->current_output, scale);
+ cc_display_config_snap_output (panel->current_config, panel->current_output);
update_apply_button (panel);
}
}
@@ -978,6 +981,7 @@ underscanning_switch_active (CcDisplayPanel *panel,
{
cc_display_monitor_set_underscanning (panel->current_output,
gtk_switch_get_active (GTK_SWITCH (button)));
+ cc_display_config_snap_output (panel->current_config, panel->current_output);
update_apply_button (panel);
}
@@ -1791,6 +1795,7 @@ output_switch_active (CcDisplayPanel *panel,
{
cc_display_monitor_set_active (panel->current_output,
gtk_switch_get_active (GTK_SWITCH (button)));
+ cc_display_config_snap_output (panel->current_config, panel->current_output);
update_apply_button (panel);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]