Improve application minimize/restore on Linux
Original Reporter info from Mantis: dodi
-
Reporter name: Hans-Peter Diettrich
Original Reporter info from Mantis: dodi
- Reporter name: Hans-Peter Diettrich
Description:
When I minimize Lazarus (or any other Lazarus application) on my Linux (openSUSE 10.3/gtk2) system, all open windows are minimized into the taskbar, and must be restored manually :-(
The attached uMiniRestore unit implements an minimize/restore manager, usable with every LCL GUI application. It hides all other windows when the application main form is minimized, what does not prevent their occurence in the taskbar, but now a single click on the taskbar item will immediately restore the mainform, and subsequently unhides all other windows.
Simply set your mainform.OnWindowStateChange to uMiniRestore.DummyInstance.MiniRestore, and enjoy :-)
Additional information:
Tested with the Lazarus IDE itself. I installed the handler in MainBase.TMainIDEBase.SetupMainMenu, as
MainIDEBar.OnWindowStateChange := @DummyInstance.MiniRestore;
You may find an better place for the handler installation.
The Application.OnMinimize (etc.) handlers were a better place to implement the handling of the application windows, but this event never fires on my system (see my according bug report)
Mantis conversion info:
- Mantis ID: 15055
- Platform: Linux
- Monitored by: » silvioprog (silvioprog)
- Target version: 0.9.30