Bug 12390 - Cannot hide a minimized window under Linux
Summary: Cannot hide a minimized window under Linux
Status: NEW
Alias: None
Product: Class Libraries
Classification: Mono
Component: Windows.Forms ()
Version: 2.10.x
Hardware: PC Linux
: Lowest normal
Target Milestone: Community
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2013-05-24 14:40 UTC by Andrzej
Modified: 2017-09-01 11:56 UTC (History)
1 user (show)

Tags: mono-community
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report for Bug 12390 on GitHub or Developer Community if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: GitHub Markdown or Developer Community HTML
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:
Status:
NEW

Description Andrzej 2013-05-24 14:40:00 UTC
Description of Problem:
There is a problem with executing Hide() command (or setting Visible property to false) on Winforms window under Linux. I made a simple app, which can be shown or hidden using trayicon click. The problem is, that hiding window fails, when the window is minimized to the taskbar. The window does not hide - the button remains in the taskbar. When clicked, only window border appears (content is "transparent"). Clicking on trayicon again (running Show() method) restores window content. When trying to hide when window is in Normal state, it does disappear correctly.

Steps to reproduce the problem:
1. Create simple Winforms application with a tray icon or second window - to be able to Show() and Hide() main form
2. Minimize main form to taskbar and try to Hide() it (or try to set Visible=false, does not matter)

Actual Results:
Window persists in taskbar. When clicking on taskbar icon, an erroneous window appears (only window borders, no contents) 

Expected Results:
Hide window and taskbar button correctly, like .NET does under Windows.

How often does this happen? 
Every application run.

Additional Information:
I tried to hide the window button using ShowInTaskbar property. It does hide the taskbar item, but the transparent "zombie" window (now even without borders) still exists and can be accessed under KDE using Alt+Tab window list.

Tried to restore (WindowState=WindowState.Normal;Refresh();) the window before hiding it. This helps but only during first hide. With this "hack" I can hide the window and restore it correctly, but when after restore I try to hide it again, the same error still happens.