-*options.txt* For Vim version 9.2. Last change: 2026 Jun 17
+*options.txt* For Vim version 9.2. Last change: 2026 Jun 23
VIM REFERENCE MANUAL by Bram Moolenaar
x <number> any X11 pointer number (see X11/cursorfont.h)
The "avail" column contains a 'w' if the shape is available for Win32,
- x for X11 (including GTK+ 2), g for GTK+ 3.
+ x for X11 (including GTK+ 2), g for GTK+ 3 and GTK 4.
Any modes not specified or shapes not available use the normal mouse
pointer.
// Only unhide if mouse actually moved. GTK seems to send a motion event
// when switching tabs, causing the cursor to unhide.
- if (p_mh && fabs(prev_mouse_x - x) > 0.05
- && fabs(prev_mouse_y - y) > 0.05)
+ if (p_mh && ((prev_mouse_x == -1 || prev_mouse_y == -1)
+ || (fabs(prev_mouse_x - x) > 0.05
+ && fabs(prev_mouse_y - y) > 0.05)))
gui_mch_mousehide(FALSE);
prev_mouse_x = x;
last_shape = shape;
}
-#else // !FEAT_MOUSESHAPE
-
- void
-mch_set_mouse_shape(int shape UNUSED)
-{
-}
-
#endif // FEAT_MOUSESHAPE
-
/*
* Menus, scrollbars, dialogs, toolbar.
* (merged from gui_gtk4.c)
if (buttons != NULL)
{
- GtkWidget *but_box = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 6);
+ GtkWidget *but_box;
char **buttons_arr; // Note that array is allocated, not strings
int n_buttons;
+ // Check 'v' flag in 'guioptions': vertical button placement.
+ if (vim_strchr(p_go, GO_VERTICAL) != NULL)
+ but_box = gtk_box_new(GTK_ORIENTATION_VERTICAL, 8);
+ else
+ but_box = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 6);
+
gtk_widget_set_halign(but_box, GTK_ALIGN_CENTER);
gtk_box_set_homogeneous(GTK_BOX(but_box), TRUE);
gtk_box_append(GTK_BOX(vertbox), but_box);