summaryrefslogtreecommitdiff
path: root/fullscreen-shell
diff options
context:
space:
mode:
authorDerek Foreman <derekf@osg.samsung.com>2014-09-19 14:43:23 -0500
committerPekka Paalanen <pekka.paalanen@collabora.co.uk>2014-09-22 14:38:13 +0300
commit69c6273f28e75ce8f42ccc36eb9257f1871a9ef2 (patch)
tree3876edea3e6e5700fb057695f7ed41f2c22d5ca2 /fullscreen-shell
parent382de46a2fc769d7cd6871399558d31d3836bbc1 (diff)
downloadweston-69c6273f28e75ce8f42ccc36eb9257f1871a9ef2.tar.gz
shell: fix weston_output_mode_switch() usage
Calling weston_output_mode_switch() with WESTON_MODE_SWITCH_RESTORE_NATIVE will result in the mode being set "back" to the passed in mode - so the passed mode should be the native mode. Additionally, weston_output_mode_switch() should be called when output->original_mode is non-NULL (which indicates we had a temporary mode set). The comparison to current_mode results in a lot of log chatter. Acked-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Diffstat (limited to 'fullscreen-shell')
-rw-r--r--fullscreen-shell/fullscreen-shell.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fullscreen-shell/fullscreen-shell.c b/fullscreen-shell/fullscreen-shell.c
index 25932d44..c7950df9 100644
--- a/fullscreen-shell/fullscreen-shell.c
+++ b/fullscreen-shell/fullscreen-shell.c
@@ -284,11 +284,11 @@ fs_output_for_output(struct weston_output *output)
static void
restore_output_mode(struct weston_output *output)
{
- if (output->current_mode != output->original_mode ||
+ if (output->original_mode ||
(int32_t)output->current_scale != output->original_scale)
weston_output_switch_mode(output,
- output->original_mode,
- output->original_scale,
+ output->native_mode,
+ output->native_scale,
WESTON_MODE_SWITCH_RESTORE_NATIVE);
}