@@ -615,8 +615,9 @@ update_chrome_visibility (EvWindow *window)
615615 fullscreen_mode = fullscreen || presentation ;
616616
617617 menubar = (priv -> chrome & EV_CHROME_MENUBAR ) != 0 && !fullscreen_mode ;
618- toolbar = ((priv -> chrome & EV_CHROME_TOOLBAR ) != 0 ||
619- (priv -> chrome & EV_CHROME_RAISE_TOOLBAR ) != 0 ) && !presentation && !fullscreen ;
618+ toolbar = !presentation && (fullscreen
619+ ? (priv -> chrome & (EV_CHROME_RAISE_TOOLBAR | EV_CHROME_FULLSCREEN_TOOLBAR )) != 0
620+ : (priv -> chrome & (EV_CHROME_TOOLBAR | EV_CHROME_RAISE_TOOLBAR )) != 0 );
620621 fullscreen_toolbar = ((priv -> chrome & EV_CHROME_FULLSCREEN_TOOLBAR ) != 0 ||
621622 (priv -> chrome & EV_CHROME_RAISE_TOOLBAR ) != 0 ) && fullscreen ;
622623 findbar = (priv -> chrome & EV_CHROME_FINDBAR ) != 0 ;
@@ -3785,6 +3786,25 @@ ev_window_cmd_file_close_all_windows (GtkAction *action,
37853786 }
37863787}
37873788
3789+ static void
3790+ focus_page_selector_revealed_cb (GtkRevealer * revealer ,
3791+ GParamSpec * pspec ,
3792+ EvWindow * window )
3793+ {
3794+ GtkAction * action ;
3795+
3796+ if (!gtk_revealer_get_child_revealed (revealer ))
3797+ return ;
3798+
3799+ action = gtk_action_group_get_action (window -> priv -> action_group ,
3800+ PAGE_SELECTOR_ACTION );
3801+ ev_page_action_grab_focus (EV_PAGE_ACTION (action ));
3802+
3803+ g_signal_handlers_disconnect_by_func (revealer ,
3804+ focus_page_selector_revealed_cb ,
3805+ window );
3806+ }
3807+
37883808static void
37893809ev_window_cmd_focus_page_selector (GtkAction * act ,
37903810 EvWindow * window )
@@ -3797,7 +3817,11 @@ ev_window_cmd_focus_page_selector (GtkAction *act,
37973817
37983818 action = gtk_action_group_get_action (window -> priv -> action_group ,
37993819 PAGE_SELECTOR_ACTION );
3800- ev_page_action_grab_focus (EV_PAGE_ACTION (action ));
3820+ if (gtk_revealer_get_child_revealed (GTK_REVEALER (window -> priv -> toolbar_revealer )))
3821+ ev_page_action_grab_focus (EV_PAGE_ACTION (action ));
3822+ else
3823+ g_signal_connect (window -> priv -> toolbar_revealer , "notify::child-revealed" ,
3824+ G_CALLBACK (focus_page_selector_revealed_cb ), window );
38013825}
38023826
38033827static void
0 commit comments