0

I have made an undecorated window, and I have used this answer as a reference in order to make it minimizable when the user clicks on the taskbar icon. I have mainly used the "simplest" version in the answer, and it is working.

Recently, I have discovered one problem; although I can minimize/un-minimize the window by clicking on the taskbar icon, but the iconifiedProperty does not change its value when the window is un-minimized - the Stage needs to receive another layout change (e.g. setMaximized(true)) in order for iconifiedProperty to transit to false state.

I need to detect this change because I am also making the window not to be full-screen when it is maximized (See this bug, it includes a temporary workaround). Again, I can make the size of the maximized window take the full visual bounds of the screen, but when a maximized window is minimized and subsequently un-mininized, the window will revert to covering the taskbar (full-screen).

Any help would be appreciated.

Edit

An update on the problem. I just realized that iconifiedProperty does not change only when the window is in maximized state.

I.e.

  1. Window is at maximized state.
  2. Window is minimized (no matter via setIconified(true) or click of taskbar icon).
  3. Window is un-minimized by clicking on taskbar icon.

This will cause iconifiedProperty to transit to true in step 2, and will not go back to false in step 3. Thereafter, repeating step 2 and 3 will not cause in the change of this property either.

This problem is not observed to happen if the window is not in maximized state, though.

Edit 2

Further testing shows that it has nothing to do with being undecorated - the iconified property change does not happen even on a normal maximized window.

Community
  • 1
  • 1
Jai
  • 8,165
  • 2
  • 21
  • 52
  • Can you use window resize events? – technomage Feb 24 '17 at 16:37
  • @technomage Thanks, I added listener to `heightProperty` and it seems like this value is changed when the screen is forced back to being full screen. – Jai Feb 27 '17 at 01:06
  • You may need to respond heuristically. I've traditionally found a lot of bugs/inconsistencies around keeping Java windows' metadata in synch with that of their native counterparts. – technomage Mar 02 '17 at 14:25

0 Answers0