Skip to content

Commit

Permalink
Completely hide pointer when fullscreen-timeout is set to 0
Browse files Browse the repository at this point in the history
That's the intuitive meaning of 0 here, it seems to me. The wrap from 0
to 3600 makes it easier in practice to switch to the effect that 0 used
to have: not hiding the pointer.

Closes: #126
  • Loading branch information
Tamaranch committed Mar 2, 2025
1 parent 15dd136 commit 1701807
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/main_window.c
Original file line number Diff line number Diff line change
Expand Up @@ -2433,6 +2433,10 @@ cb_rstto_main_window_state_event (GtkWidget *widget,
cb_rstto_main_window_hide_fs_mouse_cursor_timeout, window,
cb_rstto_main_window_hide_fs_mouse_cursor_timeout_destroy);
}
else
{
cb_rstto_main_window_hide_fs_mouse_cursor_timeout (window);
}

if (rstto_settings_get_boolean_property (window->priv->settings_manager, "hide-thumbnails-fullscreen"))
{
Expand Down Expand Up @@ -2560,13 +2564,9 @@ cb_rstto_main_window_motion_notify_event (RsttoMainWindow *window,
{
REMOVE_SOURCE (window->priv->hide_fs_mouse_cursor_timeout_id);
}
else
{
gdk_window_set_cursor (gtk_widget_get_window (GTK_WIDGET (window)), NULL);
}

if (timeout > 0)
{
gdk_window_set_cursor (gtk_widget_get_window (GTK_WIDGET (window)), NULL);
window->priv->hide_fs_mouse_cursor_timeout_id =
g_timeout_add_full (G_PRIORITY_DEFAULT, 1000 * timeout,
cb_rstto_main_window_hide_fs_mouse_cursor_timeout, window,
Expand Down
1 change: 1 addition & 0 deletions src/preferences_dialog.c
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,7 @@ rstto_preferences_dialog_init (RsttoPreferencesDialog *dialog)
dialog->priv->fullscreen_tab.cursor_timeout_label = gtk_label_new (_("Period of inactivity (seconds):"));
dialog->priv->fullscreen_tab.cursor_timeout_button = gtk_spin_button_new_with_range (0, 3600, 1);
gtk_spin_button_set_digits (GTK_SPIN_BUTTON (dialog->priv->fullscreen_tab.cursor_timeout_button), 0);
gtk_spin_button_set_wrap (GTK_SPIN_BUTTON (dialog->priv->fullscreen_tab.cursor_timeout_button), TRUE);
gtk_container_add (GTK_CONTAINER (dialog->priv->fullscreen_tab.cursor_hbox), dialog->priv->fullscreen_tab.cursor_timeout_label);
gtk_container_add (GTK_CONTAINER (dialog->priv->fullscreen_tab.cursor_hbox), dialog->priv->fullscreen_tab.cursor_timeout_button);
gtk_container_add (GTK_CONTAINER (dialog->priv->fullscreen_tab.cursor_vbox), dialog->priv->fullscreen_tab.cursor_hbox);
Expand Down

0 comments on commit 1701807

Please sign in to comment.