Re: Re: WM_NAME vs. _NET_WM_NAME



On Monday 27 October 2014 09:22:15 Florian Bruhin wrote:
* Martin Gräßlin <mgraesslin kde org> [2014-10-27 08:59:17 +0100]:
While developing a Qt application, I noticed some bugs regarding to
window title handling [1][2][3].

I assume that's Qt 5, right?

Indeed, it works fine with Qt 4.

It seems the Qt toolkit only sets _NET_WM_NAME and doesn't set WM_NAME
at all. Now that raises some questions:

- Should a client also set WM_NAME when setting _NET_WM_NAME? Sure,

  it's a good idea for backwards-compatiblity, but is it warranted to
  open a bug against Qt? (I'd say yes, but I'd like to hear other
  opinions).

From my reading of the relevant section in ICCCM (4.1.2.1) there is no
indication that a client is supposed to set it. Given that it's certainly
not a bug on Qt's side. If a window manager has problems with it, it's
more because the window manager doesn't support EWMH.

Okay. I'll still open a bug in Qt then since it seems to raise
problems in the wild - then it's up to them to decide whether it's
worth to fix it or not ;)

Fair enough, though I think it's not the task of a toolkit to be bug-to-bug 
compatible with each window manager ;-)


Qt 5's XCB backend doesn't support many "deprecated" features where there
is a EWMH replacement. For example it also doesn't support setting a
window icon through the WM_HINTS (ICCCM section 4.1.2.4) property. Given
that I interpreted this as a design decision to not support the
"deprecated" hints in the new implementation.

Do you mean the backend as in a part of Qt, or xcb itself?

The backend in Qt (qtbase/src/plugins/platforms/xcb).


At the same time knowing the Qt development I am sure they would accept
patches if it improves the interoperability.

I unfortunately don't feel comfortable enough with C++ to work on Qt
(I'm using PyQt).

- Should a window manager which implements EWMH act correctly when a

  client sets _NET_WM_NAME but not WM_NAME? (see [2])

I do not really understand this question. I looked at the bug report and
would say that's a hebstluftwm bug. For comparison KWin handles the
situation with Qt 5 windows correctly.

Okay. The question basically "is it the WM's fault, or Qt's fault" ;)

Then the answer is: WMs fault.


Shameless plug: as you are using Qt 5, consider using KF5::WindowSystem
which is a nice Qt 5 (only, no further KDE dependencies) library
implementing EWMH, supporting fallback to ICCCM if needed. It's the
library powering KWin and Plasma (e.g. taskmanager) and also used in
LXQt.

Probably not an option with PyQt, and also that's not really a
dependency I want to have just to set a window title :D

ah that be more for the case of reading the window title.

Cheers
Martin

Attachment: signature.asc
Description: This is a digitally signed message part.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]