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

QXcbWindow::setAlertState sets property instead of sending client message

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • None
    • 5.3.1, 5.4.0 Alpha
    • QPA: X11/XCB
    • None

    Description

      According to EWMH a client should send a client message in order to change the state. Verbatim quote:
      "To change the state of a mapped window, a Client MUST send a _NET_WM_STATE client message to the root window"

      But QXcbWindow::setAlertState calls QXcbWindow::setNetWmStates which is otherwise only used to update the states prior to mapping. Thus setNetWmStates updates the property instead of sending a client message.

      By not sending a client message a strict EWMH compliant window manager doesn't know that the window is demanding attention. E.g. KWin provides a global shortcut (ctrl+alt+a) to activate the window demanding attention. While the taskbar which only reads the state shows the window demanding attention, the shortcut doesn't work.

      Attached is a small qml example which can illustrate the problem with KWin. Steps to reproduce:
      1. qmlscene test.qml
      2. The window shouldn't be focused but demands attention
      3. Press ctrl+alt+a to focus
      4. click the button
      5. focus another window
      6. wait 5 sec
      7. notice that taskbar shows window as demanding attention
      8. press ctrl+alt+a

      Actual result:
      nothing happens

      Expected result:
      window gets focus

      Attachments

        1. test.qml
          0.6 kB
          Martin Gräßlin

        Issue Links

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

          Activity

            People

              paeglis Gatis Paeglis
              mgraesslin Martin Gräßlin
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes