Search
lxdream.org :: lxdream/src/gtkui/gtk_win.c :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/gtkui/gtk_win.c
changeset 1015:ad448bedc48a
prev1010:a506a2f66180
next1017:f94af28e38b7
author nkeynes
date Tue Jun 02 23:16:26 2009 +0000 (13 years ago)
permissions -rw-r--r--
last change "MythTV" patch from Wahrhaft, thanks!:
* Add support for LIRC input devices
* Add hotkey input support
* Add command-line option for immediate fullscreen
file annotate diff log raw
1.1 --- a/src/gtkui/gtk_win.c Sun Apr 12 02:04:27 2009 +0000
1.2 +++ b/src/gtkui/gtk_win.c Tue Jun 02 23:16:26 2009 +0000
1.3 @@ -248,26 +248,31 @@
1.4 main_window_t win = (main_window_t)userdata;
1.5 if( state->changed_mask & GDK_WINDOW_STATE_FULLSCREEN ) {
1.6 gboolean fs = (state->new_window_state & GDK_WINDOW_STATE_FULLSCREEN);
1.7 - GtkWidget *frame = gtk_widget_get_parent(win->video);
1.8 - if( frame->style == NULL ) {
1.9 - gtk_widget_set_style( frame, gtk_style_new() );
1.10 - }
1.11 - if( fs ) {
1.12 - gtk_widget_hide( win->menubar );
1.13 - gtk_widget_hide( win->toolbar );
1.14 - gtk_widget_hide( win->statusbar );
1.15 + main_window_show_gui(win, fs);
1.16 + }
1.17 +}
1.18
1.19 - frame->style->xthickness = 0;
1.20 - frame->style->ythickness = 0;
1.21 - } else {
1.22 - frame->style->xthickness = 2;
1.23 - frame->style->ythickness = 2;
1.24 - gtk_widget_show( win->menubar );
1.25 - gtk_widget_show( win->toolbar );
1.26 - gtk_widget_show( win->statusbar );
1.27 - }
1.28 - gtk_widget_queue_draw( win->window );
1.29 +void main_window_show_gui(main_window_t win, gboolean fullscreen)
1.30 +{
1.31 + GtkWidget *frame = gtk_widget_get_parent(win->video);
1.32 + if( frame->style == NULL ) {
1.33 + gtk_widget_set_style( frame, gtk_style_new() );
1.34 }
1.35 + if( fullscreen ) {
1.36 + gtk_widget_hide( win->menubar );
1.37 + gtk_widget_hide( win->toolbar );
1.38 + gtk_widget_hide( win->statusbar );
1.39 +
1.40 + frame->style->xthickness = 0;
1.41 + frame->style->ythickness = 0;
1.42 + } else {
1.43 + frame->style->xthickness = 2;
1.44 + frame->style->ythickness = 2;
1.45 + gtk_widget_show( win->menubar );
1.46 + gtk_widget_show( win->toolbar );
1.47 + gtk_widget_show( win->statusbar );
1.48 + }
1.49 + gtk_widget_queue_draw( win->window );
1.50 }
1.51
1.52 main_window_t main_window_new( const gchar *title, GtkWidget *menubar, GtkWidget *toolbar,
.