Skip to content
Snippets Groups Projects
Commit 77b9b57c authored by Andre Maroneze's avatar Andre Maroneze
Browse files

[Gui] change cursor to avoid issues under WSLg

See #2586.
Avoids issues when running WSLg under Ubuntu 20.04, with lablgtk3, on
Wayland, due to missing cursors (such as ARROW).
parent a4165c4d
No related branches found
No related tags found
No related merge requests found
...@@ -862,7 +862,14 @@ class main_window () : main_window_extension_points = ...@@ -862,7 +862,14 @@ class main_window () : main_window_extension_points =
let () = main_window#set_default_size ~width ~height in let () = main_window#set_default_size ~width ~height in
let () = main_window#set_geometry_hints ~min_size:(1,1) main_window#coerce in let () = main_window#set_geometry_hints ~min_size:(1,1) main_window#coerce in
let watch_cursor = Gdk.Cursor.create `WATCH in let watch_cursor = Gdk.Cursor.create `WATCH in
let arrow_cursor = Gdk.Cursor.create `ARROW in (* NOTE: the ARROW cursor is not available under some specific configurations,
e.g. WSLg + lablgtk3 + Wayland; so we avoid using it here.
Testing indicates only the following cursors are available:
BOTTOM_LEFT_CORNER, BOTTOM_RIGHT_CORNER, BOTTOM_SIDE, CROSSHAIR, HAND1,
LEFT_PTR, LEFT_SIDE, RIGHT_SIDE, TOP_LEFT_CORNER, TOP_RIGHT_CORNER,
TOP_SIDE, WATCH, XTERM
*)
let arrow_cursor = Gdk.Cursor.create `LEFT_PTR in
(* On top one finds the menubar *) (* On top one finds the menubar *)
let toplevel_vbox = GPack.box `VERTICAL ~packing:main_window#add () in let toplevel_vbox = GPack.box `VERTICAL ~packing:main_window#add () in
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment