debug-gui: migrate to GTK4
authorJosé Expósito <jose.exposito89@gmail.com>
Thu, 29 Jul 2021 16:07:32 +0000 (18:07 +0200)
committerJosé Expósito <jose.exposito89@gmail.com>
Tue, 3 Aug 2021 16:52:39 +0000 (16:52 +0000)
commit895e866da642f381e4cbfbea9703ab1843561f8e
tree02800965e2be06b759eb8417243ab3cb9e34cfc2
parent55889adeff3fe5dd666709bdbc006e1905b4dd3c
debug-gui: migrate to GTK4

Global:

- Stop passing commandline arguments to gtk_init:
  https://docs.gtk.org/gtk4/migrating-3to4.html#stop-passing-commandline-arguments-to-gtk_init

window_init function:

- gtk_window_new doesn't require a type anymore

- gtk_window_iconify has been renamed to gtk_window_minimize

- gtk_container_add has been removed in favor of container specific
  APIs. Use gtk_window_set_child in this case.

- gtk_widget_show_all has been removed, widgets are now visible by
  default:
  https://docs.gtk.org/gtk4/migrating-3to4.html#widgets-are-now-visible-by-default

- gtk_widget_set_events to NULL is no longer required, widgets must set
  their event handlers explicitly now:
  https://blog.gtk.org/2020/04/29/custom-widgets-in-gtk-4-input/

window_delete_event_cb function:

- Use the new close-request event:
  https://docs.gtk.org/gtk4/migrating-3to4.html#stop-using-gtkwidget-event-signals

map_event_cb function:

- gtk_widget_set_cursor_from_name instead of gdk_window_set_cursor

- Wait until the draw area is resized to use the whole window to start
  calculating sizes

window_place_ui_elements function:

- Use gtk_widget_get_width and gtk_widget_get_height instead of
  gtk_window_get_size

Drawing:

- Use gtk_drawing_area_set_draw_func instead of the GtkWidget::draw
  signal:
  https://docs.gtk.org/gtk4/migrating-3to4.html#adapt-to-drawing-model-changes

Signed-off-by: José Expósito <jose.exposito89@gmail.com>
meson.build
tools/libinput-debug-gui.c