-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Programmatically enable/disable resizable #372
Comments
Oops, this the issue to talk about what's happening on older Gtk3. After executing line 754 of gtk.c gtk_window_resize(GTK_WINDOW(app->os.window), app->width, app->height); Is when the (shoes:21292): Gtk-WARNING **: Toplevel size doesn't seem to directly depend on the size of the geometry widget from gtk_window_set_geometry_hints(). The geometry widget might not be in the window, or it might not be packed into the window appropriately occurs - the code to call |
Are you in sync with the repo? The only place there is The part I wrote ultimately went to use |
Woah. There was a huge bug on Github. It displayed a previous version of the code. Now it all uses |
setting NULL instead of gk-window fixes the Gtk console warning - as you suggested. The compiler gtk3 deprecation warning are going to be trouble some. I hate to ignore warning but we may have to. |
This solution in Vala makes me think that a simple dummy call to
|
That one I do want to fix - it's very visible. Finding the proper places is the challenge. I'm not going to get to it very soon so If you want to give it a try then go for it. I was talking about the compiler warnings: the deprecations with different versions of gtk3. Those are not as easy as I hoped. |
This is a common problem when people moved to 3.20. There are so many hits on google but very little to none solutions. You may want to take a look at gtkwidget.c top comment. A lengthy informative comment related to geometry management. It shouldn't be hard to find out: all widgets must check for preferred width and height. And a step-by-step debugging on |
* begin work on osx equivalent functions
I removed two lines in gtk/gtkbuttonalt.c and let gtk use its own preferred width/height and it works. Not sure what the actual implications would be to that but An attempt to use gtk_widget_get_preferred_width/height within the user functions gtk_button_alt_get_preferred_width/height caused a core dump. First, I tried similar to VALA code with the widget and some dummy &x, &y variables. Secondly, I tried with NULL per the documentation but it yielded in more warnings. Finally, I tried with the actual minimum and natural passed to the function but it core dumps. |
Now merged to master branch. Osx behaves differently on the bugs/bug372.rb script: After resizing and clicking disable the osx window stays at the new size which I think is better but it's such an edge case I'm not going to spend much thought about it. |
This should be the expected behaviour. I think GTK is being naughty on this one. |
This feature allows to programmatically change resizable passed down to Shoes.app (or a window). There is still some work to do because while the feature fully works, setting resizable to false will unfortunately resize the window back to its default. Hence, it has been committed to a remote branch.
Additional references:
The text was updated successfully, but these errors were encountered: