DSheirer / sdrtrunk

A cross-platform java application for decoding, monitoring, recording and streaming trunked mobile and related radio protocols using Software Defined Radios (SDR). Website:
GNU General Public License v3.0
1.61k stars 258 forks source link

View dialog windows open minimized #1619

Closed hans109h closed 1 year ago

hans109h commented 1 year ago

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):

mwsltn commented 1 year ago

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 commented 1 year ago

@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.

hans109h commented 1 year ago

@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 commented 1 year ago

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

DSheirer commented 1 year ago

@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 commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

@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 commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

@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 commented 1 year ago

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]`

DSheirer commented 1 year ago

@hans109h Thank you for the PR!

DSheirer commented 1 month ago

I reverted the changes from the PR associated with this issue here: #2047

If this issue reappears, we'll need a different solution.