Skip to content

Commit

Permalink
[FreetuxTV] Restore the original window position after fullscreen mod…
Browse files Browse the repository at this point in the history
…e (Fixes issue 131)
  • Loading branch information
eric.beuque committed Apr 19, 2012
1 parent 1fd1381 commit 63fc982
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
FreetuxTV 0.6.4 (2012-XX-XX)
- Issue 145: Fix dialog add group loading with corrupted XML file
- Improve help to be compatible with help2man
- Issue 131: Restore the original window position after fullscreen mode

FreetuxTV 0.6.3 (2012-04-01)
- Rename the menu to synchronize TV channel list.
Expand Down
6 changes: 6 additions & 0 deletions lib/libvlc-gtk/gtk-libvlc-media-player.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ struct _GtkLibvlcMediaPlayerPrivate
GtkWidget* pWigdetOriginalParent;
GtkWidget* pWindowFullscreen;

gint root_x;
gint root_y;

gboolean isModeFullscreen;

GtkAccelGroup *pAccelGroup;
Expand Down Expand Up @@ -1618,6 +1621,7 @@ gtk_libvlc_media_player_set_fullscreen (GtkLibvlcMediaPlayer *self, gboolean ful

GtkWidget *pTopLevel = gtk_widget_get_toplevel (priv->pWigdetOriginalParent);
if (gtk_widget_is_toplevel (pTopLevel)) {
gtk_window_get_position (GTK_WINDOW(pTopLevel), &priv->root_x, &priv->root_y);
gtk_widget_hide(pTopLevel);
}

Expand All @@ -1639,6 +1643,8 @@ gtk_libvlc_media_player_set_fullscreen (GtkLibvlcMediaPlayer *self, gboolean ful
GtkWidget *pTopLevel = gtk_widget_get_toplevel (priv->pWigdetOriginalParent);
if (gtk_widget_is_toplevel (pTopLevel)) {
gtk_widget_show(pTopLevel);
// Restore the previous position of the windows that was erased by gtk_widget_hide
gtk_window_move(GTK_WINDOW(pTopLevel), priv->root_x, priv->root_y);
}


Expand Down

0 comments on commit 63fc982

Please sign in to comment.