Skip to content
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

Bug/window resize take 2 #458

Merged
merged 3 commits into from
Jan 8, 2020
Merged

Conversation

tuttza
Copy link
Contributor

@tuttza tuttza commented Jan 8, 2020

Okay this time I've really fixed the issue resize issue. I've also added GTK macro type checks when calling the UI functions from the GTK API with widgets.

So according to the GTK docs:
Unlike gtk_widget_set_size_request(), which sets a size request for a widget and thus would keep users from shrinking the window, this function only sets the initial size, just as if the user had resized the window themselves. Users can still shrink the window again as they normally would. Setting a default size of -1 means to use the “natural” default size (the size request of the window).

there were two main issues I found:

  1. sometimes the widget was null
  2. I updated the width to be -1 value based on comment above in the gtk docs and sure enough all the nasty errors went away and window was resizing properly. also vertical bar issue was fixed by this as well.

again more clean up in gtk.c. Anyhow my goal currently is to get the master branch as stable as possible in its current state. I'm working on updating gtk to properly cast the correct types when calling ui functions, clean up errors in other source files. stay tuned!

@ccoupe ccoupe merged commit 0bf590a into shoes:master Jan 8, 2020
@ccoupe
Copy link

ccoupe commented Jan 8, 2020

Looking pretty good! Two new issues.

  1. the scroll bars do move correctly as the window resizes but the thumb doesn't change position visually as the contents are scrolled.
  2. I can resize the window smaller than the initial size. Some folks might like that but it's a change from how Shoes worked in the past.
  3. Windows can't set the height smaller after a resize larger.

@tuttza
Copy link
Contributor Author

tuttza commented Jan 8, 2020

REF: #430

Thanks @ccoupe

I noticed point number 1 as well. I will work on that next.

Regarding point number 2 I wasn't sure how that was supposed to work, I can mess with it to get it back to its original state, its funny it works that way when you disable menus(from startup.yaml) currently. just needs some more tweaking.

@ccoupe
Copy link

ccoupe commented Jan 9, 2020

I should have told you to use the remote branch 'direwolf' which has some 3.3.8 restructuring stuff* in gtk.c . I've managed to merge master (plus your changes) into 'direwolf' and it seems to have the same issues/fixes so that's good plus the garbage at quit - that's got to be one of my induced bugs.

  • stuff
    move dialogs out of gtk.c
    rename some functions to be 'native'
    ruby 2.4+ compatibility - I use 2.5.5

@tuttza
Copy link
Contributor Author

tuttza commented Jan 9, 2020

so is master considered 3.3.8 now? or should my work be done on the direwolf branch?

@ccoupe
Copy link

ccoupe commented Jan 9, 2020

direwolf would be better. Master always lags behind - sometime way behind. Ideally, master is 3.3.7 (current plus some fixes) and some other branch is the next one (direwolf/3.3.8). 3.3.8 is a big change internally - enough that I might call it 3.4, assuming it ever gets out.

@ccoupe
Copy link

ccoupe commented Jan 9, 2020

I've push all the changes you made to master into direwolf so you can grab it and not have to deal with the merge mess - it will look a little different inside gtk.c

@ccoupe
Copy link

ccoupe commented Jan 12, 2020

@tuttza I fixed a few compiler warnings and finished moving some code out of gtk.c. There's a few more I want to fix - nothing that will change what you're debugging but you may have to pull direwolf branch to get them.

@ccoupe
Copy link

ccoupe commented Jan 12, 2020

Here is a groaner, @tuttza - On Raspbian Buster, your resize code works well (better than Mint 19.1) but has a slightly new error - some new windows are blank until a manual resize. I've seen this one too and its related. Odds are very high that Buster has a newer Gtk3 version than the linux we use.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants