Commit 08b2f453 authored by Stepan Salenikovich's avatar Stepan Salenikovich Committed by Guillaume Roguez

fix displaced preview video on Wayland

GtkStack transitions are broken on wayland and result in any cairo
surface contained in a GtkStack with transitions to be displaced
outside of the window. This patch disables the transitions in the
GtkStack which contains our preview VideoWidget.

Change-Id: Iac4e1435635408e6b6d860d334382f888ab06a25
Tuleap: #1320
Reviewed-by: Guillaume Roguez's avatarGuillaume Roguez <guillaume.roguez@savoirfairelinux.com>
parent 1820ba16
......@@ -671,7 +671,6 @@ settings_clicked(G_GNUC_UNUSED GtkButton *button, RingMainWindow *win)
if (priv->last_settings_view == priv->general_settings_view)
general_settings_view_show_profile(GENERAL_SETTINGS_VIEW(priv->general_settings_view), TRUE);
gtk_stack_set_transition_type(GTK_STACK(priv->stack_main_view), GTK_STACK_TRANSITION_TYPE_SLIDE_UP);
gtk_stack_set_visible_child(GTK_STACK(priv->stack_main_view), priv->last_settings_view);
} else {
/* hide the settings */
......@@ -696,7 +695,6 @@ settings_clicked(G_GNUC_UNUSED GtkButton *button, RingMainWindow *win)
media_settings_view_show_preview(MEDIA_SETTINGS_VIEW(priv->media_settings_view), FALSE);
general_settings_view_show_profile(GENERAL_SETTINGS_VIEW(priv->general_settings_view), FALSE);
gtk_stack_set_transition_type(GTK_STACK(priv->stack_main_view), GTK_STACK_TRANSITION_TYPE_SLIDE_DOWN);
gtk_stack_set_visible_child_name(GTK_STACK(priv->stack_main_view), CALL_VIEW_NAME);
/* show the view which was selected previously */
......@@ -712,7 +710,6 @@ show_media_settings(GtkToggleButton *navbutton, RingMainWindow *win)
if (gtk_toggle_button_get_active(navbutton)) {
media_settings_view_show_preview(MEDIA_SETTINGS_VIEW(priv->media_settings_view), TRUE);
gtk_stack_set_transition_type(GTK_STACK(priv->stack_main_view), GTK_STACK_TRANSITION_TYPE_SLIDE_RIGHT);
gtk_stack_set_visible_child_name(GTK_STACK(priv->stack_main_view), MEDIA_SETTINGS_VIEW_NAME);
priv->last_settings_view = priv->media_settings_view;
} else {
......@@ -727,7 +724,6 @@ show_account_settings(GtkToggleButton *navbutton, RingMainWindow *win)
RingMainWindowPrivate *priv = RING_MAIN_WINDOW_GET_PRIVATE(win);
if (gtk_toggle_button_get_active(navbutton)) {
gtk_stack_set_transition_type(GTK_STACK(priv->stack_main_view), GTK_STACK_TRANSITION_TYPE_SLIDE_RIGHT);
gtk_stack_set_visible_child_name(GTK_STACK(priv->stack_main_view), ACCOUNT_SETTINGS_VIEW_NAME);
priv->last_settings_view = priv->account_settings_view;
}
......@@ -741,7 +737,6 @@ show_general_settings(GtkToggleButton *navbutton, RingMainWindow *win)
if (gtk_toggle_button_get_active(navbutton)) {
general_settings_view_show_profile(GENERAL_SETTINGS_VIEW(priv->general_settings_view), TRUE);
gtk_stack_set_transition_type(GTK_STACK(priv->stack_main_view), GTK_STACK_TRANSITION_TYPE_SLIDE_RIGHT);
gtk_stack_set_visible_child_name(GTK_STACK(priv->stack_main_view), GENERAL_SETTINGS_VIEW_NAME);
priv->last_settings_view = priv->general_settings_view;
} else {
......@@ -755,7 +750,6 @@ on_account_creation_completed(RingMainWindow *win)
g_return_if_fail(IS_RING_MAIN_WINDOW(win));
RingMainWindowPrivate *priv = RING_MAIN_WINDOW_GET_PRIVATE(win);
gtk_stack_set_transition_type(GTK_STACK(priv->stack_main_view), GTK_STACK_TRANSITION_TYPE_SLIDE_LEFT);
gtk_stack_set_visible_child_name(GTK_STACK(priv->stack_main_view), CALL_VIEW_NAME);
/* destroy the wizard */
......
......@@ -105,8 +105,8 @@
<child>
<object class="GtkStack" id="stack_main_view">
<property name="visible">True</property>
<property name="transition-type">GTK_STACK_TRANSITION_TYPE_SLIDE_UP</property>
<property name="transition-duration">400</property>
<!-- disable transitions for Wayland, Tuleap: #1320 !-->
<property name="transition-type">GTK_STACK_TRANSITION_TYPE_NONE</property>
</object>
</child>
</template>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment