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

Spot resizes itself every time it is opened (elementaryOS 6) #424

Open
AnElementaryUser opened this issue Jan 12, 2022 · 14 comments
Open

Spot resizes itself every time it is opened (elementaryOS 6) #424

AnElementaryUser opened this issue Jan 12, 2022 · 14 comments
Labels
bug Something isn't working

Comments

@AnElementaryUser
Copy link

Describe the bug
Spot resizes itself every time it is opened.

To Reproduce
Steps to reproduce the behavior:

  1. Open Spot
  2. Close it.
  3. Open Spot again.
  4. See that the window is resized.

Expected behavior
It will remember the window size.

Screenshots
Screen-record-from-2022-01-12

General information:

  • Distribution: elementaryOS 6
  • Installation method: Flathub
  • Version [e.g. 0.1.0]: 0.2.2
  • Device used [e. g. desktop, phone...]: Desktop

Stack trace:
If applicable, run the application from a terminal and paste relevant log output.

flatpak run --env=RUST_BACKTRACE=full dev.alextren.Spot

Screenshot from 2022-01-12 20 33 12

Additional context
Add any other context about the problem here.

@AnElementaryUser AnElementaryUser added the bug Something isn't working label Jan 12, 2022
@AnElementaryUser
Copy link
Author

Latest release (0.3) solved this issue.

@xou816
Copy link
Owner

xou816 commented Jan 14, 2022

Hi! Thanks for the report. Looks like we are not always saving the window size to gsettings. Do you see values being updated if you do the following?

flatpak --command=sh run dev.alextren.Spot # runs a shell in the flatpak image
spot 
# resize then close spot / ^C
gsettings get dev.alextren.Spot window-width # should log the last recorded width of the window 

@xou816
Copy link
Owner

xou816 commented Jan 14, 2022

Oops, just a bit late :D I don't remember us fixing anything related to that in the latest version though, so feel free to reopen this issue if you encounter the problem again!

@ghost
Copy link

ghost commented Jan 23, 2022

Hi @xou816

Could you please re-open this issue because I am having the same problem but I couldn't find a way to mitigate this?

Thanks.

@xou816
Copy link
Owner

xou816 commented Jan 24, 2022

Sure! Would you mind trying these steps and reporting your results here?

@xou816 xou816 reopened this Jan 24, 2022
@ghost
Copy link

ghost commented Jan 24, 2022

As you said, I manually resized window then closed it.

$ flatpak --command=sh run dev.alextren.Spot
[📦 dev.alextren.Spot ~]$ spot

(spot:7): Gtk-WARNING **: 16:54:27.935: GtkGizmo 0x561a94554bb0 (highlight) reported min width -2, but sizes must be >= 0
[📦 dev.alextren.Spot ~]$ gsettings get dev.alextren.Spot window-width
1179

Then I launched it again and this time I didn't resize it and the number was up.

[📦 dev.alextren.Spot ~]$ spot

(spot:83): Gtk-WARNING **: 16:55:11.489: GtkGizmo 0x5578f67cdb80 (highlight) reported min width -2, but sizes must be >= 0
[📦 dev.alextren.Spot ~]$ gsettings get dev.alextren.Spot window-width
1207

@ghost
Copy link

ghost commented Feb 10, 2022

Hi @xou816

Any news about this? Anything I can help with?

@xou816
Copy link
Owner

xou816 commented Feb 10, 2022

Hi! Sorry, forgot about this. I sometimes notice this too, especially when making the window narrow -- I guess Gtk sometimes think it needs to have more space than truly needed.

Otherwise saving and restoring the values seems to work! So maybe the window manager is messing with the size here?

I'll still have to fix a little something, right now the sizes are not saved when quitting using Quit/<Ctrl>Q

@xou816
Copy link
Owner

xou816 commented Feb 10, 2022

Just to be clear, are you observing significant differences in window sizes? I can't tell from OP's gif

@ghost
Copy link

ghost commented Feb 11, 2022

saving and restoring the values seems to work

I don't wanna sound dumb but how can I save the values 😅😅

Just to be clear, are you observing significant differences in window sizes? I can't tell from OP's gif

OPs gif is so mysterious 😂 I think there is no proper screen recorder for elementary, that could be why it looks potato.

Back to your question, yes, window sizes change radically between sessions under X11, on wayland not so much. If I force the app to use Adwaita via Flatseal, it doesn't change much. Libadwaita could be causing this but I am out of ideas.

@xou816
Copy link
Owner

xou816 commented Feb 11, 2022

I don't wanna sound dumb but how can I save the values 😅😅

No worries, I meant the thing we tested where the values were updated in gsettings!

But yeah, if it's down to a Wayland/X11 thing or a DE specific, I fear I won't want to look too hard into it... 😄 I'll push a fix for the size not being persisted when quitting, not closing the window.

@xou816
Copy link
Owner

xou816 commented Feb 20, 2022

Almost forgot... again... but I pushed the small fix I mentioned

As for the random resizing, I am not really willing to investigate it much further if all it does is get the size wrong by a small amount, especially if it's some tricky Gtk resizing behavior or a DE issue

@ghost
Copy link

ghost commented Feb 20, 2022

Whether it is fixed or not, it is a great application. Thank you!

@bilelmoussaoui
Copy link
Contributor

I am pretty sure this is a gtk issue specific to x11

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants