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

View dialog windows open minimized #1619

Closed
hans109h opened this issue Jul 31, 2023 · 15 comments · Fixed by #1719 or #1738
Closed

View dialog windows open minimized #1619

hans109h opened this issue Jul 31, 2023 · 15 comments · Fixed by #1719 or #1738
Assignees
Labels
Milestone

Comments

@hans109h
Copy link
Contributor

sdrtrunk Version
master-branch (6.0-alpha7)

Describe the bug
Playlist editor, DMR recording viewer, icon manager, and user preferences dialog windows open as completely minimized (vertical black bar) after one of them has been opened and then closed.

To Reproduce
Steps to reproduce the behavior:

  1. Start SDRTrunk
  2. Open one of the dialog windows via the view menu.
  3. Close the dialog window.
  4. Open any other dialog window via the view menu.

Expected behavior
Window should open in default size and location with window contents visible.

Screenshots
image

Application Log
Nothing useful.

Desktop (optional - complete the following information):

  • OS: Ubuntu 23.04
  • CPU Cores: 8
  • RAM: Lots

Additional context
It's been doing this for a while, I haven't had a chance to see if I can find the regression.

@hans109h hans109h added the bug label Jul 31, 2023
@mwsltn
Copy link

mwsltn commented Nov 8, 2023

I can also confirm this behavior:

OS: Archlinux

JDK:
openjdk 21 2023-09-19
OpenJDK Runtime Environment (build 21+35)
OpenJDK 64-Bit Server VM (build 21+35, mixed mode, sharing)

sdrtrunk version: 0.5.3

@DSheirer
Copy link
Owner

@hans109h and @mwsltn I'm unable to reproduce this error.

However, I did find a code error in the JavaFxWindowManager where it wasn't monitoring the Java FX window size and position correctly. It is supposed to monitor the windows so that it can record where the user last placed the window so that on restoration it will resize and position the window at the same place.

I'm going to submit that change against this issue and that will close out this issue. If the change doesn't resolve this issue, please reopen this issue and we'll try again.

@DSheirer DSheirer self-assigned this Nov 10, 2023
@DSheirer DSheirer added this to the Version 0.6.0 milestone Nov 10, 2023
DSheirer pushed a commit that referenced this issue Nov 10, 2023
…w minimized after application is started and an initial JavaFX window is opened and then closed, where it impacted subsequent JavaFX window openings. Corrects issue where JavaFX stage monitors were not being registered correctly, so that they could be deregistered prior to application shutdown.
DSheirer added a commit that referenced this issue Nov 10, 2023
@hans109h
Copy link
Contributor Author

@DSheirer unfortunately it didn't resolve the issue. I can confirm that it does indeed remember the location (and size) of the window, so that when initially opened it returns there, but any opening of the dialog window after the initial result in the window completely minimized and only visible as a thin line on the screen.

@DSheirer
Copy link
Owner

Reopening. Will attempt to force the window out of the 'iconified' state before invoking show and focus.

@DSheirer DSheirer reopened this Nov 11, 2023
DSheirer added a commit that referenced this issue Nov 11, 2023
…conified

#1619 JavaFX Windows Restore to Previous Size/Location On View Request
@DSheirer
Copy link
Owner

@hans109h I merged some additional changes to attempt to fix this issue. The nightly build process just completed generating a new build with this change. Can you please access the nightly build and verify if the issue is resolved?

@hans109h
Copy link
Contributor Author

Negative, issue still present. Window opens normal on first open, after being closed it only opens in its iconified state. If location of window is changed, the location is accurately remembered when opened even in iconified state.

@hans109h
Copy link
Contributor Author

On any open of the Playlist Editor, getting this in the syslog:
Window manager warning: Buggy client sent a _NET_ACTIVE_WINDOW message with a timestamp of 0 for 0xe00003

On open of the Icon Manager, getting this in the syslog:
mutter-x11-fram[461397]: gtk_widget_size_allocate(): attempt to allocate MetaFrameContent widget 0x55825bb76110 with width 1 and height -28
gnome-shell[459369]: *** BUG ***
gnome-shell[459369]: In pixman_region32_init_rect: Invalid rectangle passed
gnome-shell[459369]: Set a breakpoint on '_pixman_log_error' to debug
gnome-shell[459369]: *** BUG ***
gnome-shell[459369]: In pixman_region32_init_rect: Invalid rectangle passed
gnome-shell[459369]: Set a breakpoint on '_pixman_log_error' to debug

@lwvmobile
Copy link

Same as above, on the latest nightly release (as of Nov 12, 2023) I get same message after opening the playlist editor once, closing it, and then reopening it, it opens in an extremely small/skinny window.

Window manager warning: Buggy client sent a _NET_ACTIVE_WINDOW message with a timestamp of 0 for 0x8600004

@DSheirer
Copy link
Owner

@hans109h @lwvmobile have these warnings just started to appear with the 'tweaks' that I've been making to get the minimized windows to restore?

@lwvmobile
Copy link

I just went back and downloaded Version 0.5.3 (final) and it also occurs there, so its nothing to do with any recent updates unless it predates that release somehow. I honestly think this is more to do with newer Gnome or Mutter updates in my case, but could be present in other desktop environments as well. This is using GNOME version 45.0 with Mutter window manager (Arch).

@DSheirer
Copy link
Owner

I'm running KDE ... not seeing the error logging and not seeing this issue with restoring windows. I'll have to dig a bit more to see if it's been identified elsewhere.

@hans109h
Copy link
Contributor Author

I feel like I would have noticed the syslog message back in July had it been there. I'm currently on a later release of gnome and mutter since then, so I'm thinking the log message is likely a result of those updates rather than changes to sdrtrunk.

@DSheirer
Copy link
Owner

@hans109h it seems like the window is restoring from its minimized state and it's positioning (x/y) correctly, but it appears that the width and height might be set to zero. I'm wondering if this is a bug for JavaFX.

Could you run from master code branch and add the following logger to the end of the JavaFxWindowManager.restore() method and launch the application, open one of the JavaFX windows, close it, and then reopen it from the menu option?

        System.out.println("Stage [" + stage.getTitle() + "] restored - width[" + stage.getWidth() + "] height [" + stage.getHeight() + "]");

I'm curious what Java reports as the height and width of that stage once it thinks the window has been restored.

@hans109h
Copy link
Contributor Author

hans109h commented Nov 14, 2023

Line 1, initial playlist editor open. Line 2, 2nd open. After the second open I resized the iconified window and moved it, then closed it. Line 3, third open.

Just not doing what it's told!

`Stage [sdrtrunk - Playlist Editor] restored - width[959.0] height [355.0]

Stage [sdrtrunk - Playlist Editor] restored - width[959.0] height [355.0]

Stage [sdrtrunk - Playlist Editor] restored - width[834.0] height [328.0]`

hans109h added a commit to hans109h/sdrtrunk that referenced this issue Nov 14, 2023
DSheirer added a commit that referenced this issue Nov 15, 2023
Update JavaFxWindowManager.java for #1619
@DSheirer
Copy link
Owner

@hans109h Thank you for the PR!

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