Fix restoring window visibility (Windows/Mac) #7976

This commit is contained in:
Robin Gareus 2020-04-19 19:00:05 +02:00
parent ef206d8066
commit 498a58bd25
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04

View File

@ -26,7 +26,11 @@ bool VisibilityTracker::_use_window_manager_visibility = true;
VisibilityTracker::VisibilityTracker (Gtk::Window& win) VisibilityTracker::VisibilityTracker (Gtk::Window& win)
: _window (win) : _window (win)
#if (defined PLATFORM_WINDOWS || defined __APPLE__)
, _visibility (GdkVisibilityState (0))
#else
, _visibility (GDK_VISIBILITY_FULLY_OBSCURED) , _visibility (GDK_VISIBILITY_FULLY_OBSCURED)
#endif
{ {
_window.add_events (Gdk::VISIBILITY_NOTIFY_MASK); _window.add_events (Gdk::VISIBILITY_NOTIFY_MASK);
_window.signal_visibility_notify_event().connect (sigc::mem_fun (*this, &VisibilityTracker::handle_visibility_notify_event)); _window.signal_visibility_notify_event().connect (sigc::mem_fun (*this, &VisibilityTracker::handle_visibility_notify_event));