Commit a9350d89 authored by Paolo Bacchilega's avatar Paolo Bacchilega
Browse files

show the curcors again when exiting from fullscreen mode

parent 539153c3
......@@ -77,7 +77,7 @@ static GtkActionEntry gth_browser_action_entries[] = {
{ "Edit_Extensions", NULL,
N_("Extensions"), NULL,
N_("Activate and configure the application extensions"),
N_("Activate, deactivate and configure the gthumb extensions"),
G_CALLBACK (gth_browser_activate_action_edit_extensions) },
{ "Edit_SelectAll", GTK_STOCK_SELECT_ALL,
......
......@@ -3905,15 +3905,14 @@ gth_browser_fullscreen (GthBrowser *browser)
_gth_browser_create_fullscreen_toolbar (browser);
gth_browser_show_viewer_properties (browser, FALSE);
gtk_window_fullscreen (GTK_WINDOW (browser));
gth_window_set_current_page (GTH_WINDOW (browser), GTH_BROWSER_PAGE_VIEWER);
gth_window_show_only_content (GTH_WINDOW (browser), TRUE);
gtk_window_fullscreen (GTK_WINDOW (browser));
if (browser->priv->viewer_page != NULL) {
gth_viewer_page_show (browser->priv->viewer_page);
gth_viewer_page_fullscreen (browser->priv->viewer_page, TRUE);
gth_viewer_page_show_pointer (browser->priv->viewer_page, FALSE);
}
gth_browser_update_sensitivity (browser);
browser->priv->last_mouse_x = 0.0;
......@@ -3931,11 +3930,12 @@ gth_browser_unfullscreen (GthBrowser *browser)
browser->priv->fullscreen = FALSE;
gtk_widget_hide (browser->priv->fullscreen_toolbar);
gtk_window_unfullscreen (GTK_WINDOW (browser));
gth_window_show_only_content (GTH_WINDOW (browser), FALSE);
if (browser->priv->viewer_page != NULL)
gtk_window_unfullscreen (GTK_WINDOW (browser));
if (browser->priv->viewer_page != NULL) {
gth_viewer_page_fullscreen (browser->priv->viewer_page, FALSE);
gth_viewer_page_show_pointer (browser->priv->viewer_page, TRUE);
}
gth_browser_update_sensitivity (browser);
if (browser->priv->motion_signal != 0)
......
......@@ -2525,6 +2525,9 @@ gth_image_viewer_get_reset_scrollbars (GthImageViewer *viewer)
void
gth_image_viewer_show_cursor (GthImageViewer *viewer)
{
if (viewer->priv->cursor_visible)
return;
viewer->priv->cursor_visible = TRUE;
gdk_window_set_cursor (GTK_WIDGET (viewer)->window, viewer->priv->cursor);
}
......@@ -2533,6 +2536,9 @@ gth_image_viewer_show_cursor (GthImageViewer *viewer)
void
gth_image_viewer_hide_cursor (GthImageViewer *viewer)
{
if (! viewer->priv->cursor_visible)
return;
viewer->priv->cursor_visible = FALSE;
gdk_window_set_cursor (GTK_WIDGET (viewer)->window, viewer->priv->cursor_void);
}
......@@ -2542,20 +2548,23 @@ void
gth_image_viewer_set_cursor (GthImageViewer *viewer,
GdkCursor *cursor)
{
if (cursor != NULL)
gdk_cursor_ref (cursor);
if (viewer->priv->cursor != NULL) {
gdk_cursor_unref (viewer->priv->cursor);
viewer->priv->cursor = NULL;
}
if (cursor != NULL) {
viewer->priv->cursor = gdk_cursor_ref (cursor);
}
if (cursor != NULL)
viewer->priv->cursor = cursor;
else
viewer->priv->cursor = gdk_cursor_ref (viewer->priv->cursor_void);
if (! GTK_WIDGET_REALIZED (viewer))
return;
gdk_window_set_cursor (GTK_WIDGET (viewer)->window, viewer->priv->cursor);
if (viewer->priv->cursor_visible)
gdk_window_set_cursor (GTK_WIDGET (viewer)->window, viewer->priv->cursor);
}
......
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