Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-48161

QDockWidget emits visibilityChanged(false) when minimizing the window or switching virtual desktops

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Do
    • P2: Important
    • 6.5.3, 6.6.0 Beta2, 6.7.0 FF
    • 4.8.7, 5.6, 5.15.14, 6.5.1
    • Widgets: Main Window
    • None
    • Qt4, X11, KDE4, kwin
    • 7993321e7 (dev), 9361d8057 (6.5), bede24ee0 (6.6)

    Description

      Minimizing the window, or switching virtual desktops leads to UnmapNotify (on X11) which hides the toplevel window, which calls this code in qdockwidget.cpp:

      case QEvent::Hide:
      if (layout != 0)
      layout->keepSize(this);
      d->toggleViewAction->setChecked(false);
      emit visibilityChanged(false);
      break;

      If the app connects visibilityChanged(false) to a slot which toggles a QAction, then the dockwidget will not be shown again when switching back to the virtual desktop where the app is.

      I think there's a missing check for event->spontaneous() in that code?

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            axelspoerl Axel Spoerl
            dfaure_kdab David Faure
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews