You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 8, 2021. It is now read-only.
Line 41 in sourcefile mainwindow.rs enables moving window by pressing mousebutton over the headerbar in the window. When running the program in shell and moving the window I get this message:
https://developer.gnome.org/gtk3/stable/GtkHeaderBar.html
(using headerbar with set_titlebar)
For these reasons, GtkHeaderBar is the natural choice for use as the custom titlebar widget of a GtkWindow (see gtk_window_set_titlebar()), as it gives features typical of titlebars while allowing the addition of child widgets.
There are a couple of mistakes in the attached example:
putting the headerbar into a vbox and then afterwards setting it as titlebar, that's not allowed as each widget must only have a single parent. That gets rid of the critical warnings. If you set it as a titlebar then you can move the window on it, if you add it to the vbox then you need to implement the moving yourself
disabling decorations for the window, this will also disable the titlebar
Line 41 in sourcefile mainwindow.rs enables moving window by pressing mousebutton over the headerbar in the window. When running the program in shell and moving the window I get this message:
gtk_container_propagate_draw: assertion '_gtk_widget_get_parent (child) == GTK_WIDGET (container)' failed
https://developer.gnome.org/gtk3/stable/GtkHeaderBar.html
(using headerbar with set_titlebar)
For these reasons, GtkHeaderBar is the natural choice for use as the custom titlebar widget of a GtkWindow (see gtk_window_set_titlebar()), as it gives features typical of titlebars while allowing the addition of child widgets.
https://developer.gnome.org/gtk3/stable/GtkWindow.html#gtk-window-set-titlebar
(set-titlebar api)
In gtk refrences it seems that set-titlebar should accept any type of GtkWidget
I am new to rust, gtk, open source and linux programming so excuse stupid misstakes I have made.
example code below
moving_window_error.zip
The text was updated successfully, but these errors were encountered: