[Qt-interest] How to know when pager switches to another virtual desktop (X11) ?

Zeljko zeljko at holobit.net
Fri May 28 11:20:38 CEST 2010


Thiago Macieira wrote:

> That doesn't mean anything.
> 
> First of all, the desktop platforms are definitely important. Maybe
> they're not the focus of most attention, but they're definitely important.

Please, don't misunderstand me, I know that all platforms are important, but
reality is different.Mobile is not focused for few days / few weeks but for
much longer time and others are "out of focus" since that time.
I'm sorry but I can't wait a year to get something fixed.I'm using qt for >
10yrs , so know exactly what I'm talking about.

> Second, if the patch is good, why not accept it? Especially since we
> didn't have the time to implement it ourselves?

No, patch is not good for Qt atm since it's written in OOP , and used for
lazarus project (lazarus.freepascal.org), but I can write an C++ since it's
not strange to me.Real problem is where to implement it:
1.Implementation point could be QDesktopWidget (but then problem is
multiplatform implementation - since I don't know and I don't have time to
investigate various win/mac vdesktop solutions), on the other hand some
classes are already disturbed by platform specific things (like
QApplication etc etc) so why not.
So in this case my idea would be to have signal
QDesktopWidget::virtualDesktopChanged(int old,new)  which should trigger
before windowstatechange (since it's too late then), also two helper
functions currentVirtualDesktop, currentApplicationVirtualDesktop (or
whatever naming - doesn't matter at all).

2.It could be also implemented into QX11Info like signal (again , must
trigger before windowstatechange) so won't disturb others by changing
QDesktopWidget api.

3.Could be anywhere :) I'm using it in QEvent::WindowStateChange by querying
X for current and application desktop, so that's how it works for me.

Now my question: Are you sure that such thing will be accepted in
trunk ,even is patch is 100% ok ? 

Also, there are some issues which proves that you're not 100% correct about
concerning over some platforms.We can take QPrinter for example:
QPrinter vs. cups - Basic thing which should work "out of the box".
Look at this issue please: http://bugreports.qt.nokia.com/browse/QTBUG-3033
It's reported during Qt-4.4.3 and fixed in Qt-4.6.1. Is it ok for you ?
Basic things should be 1st priority otherwise we have half polished project
which deserves beta status.

PS: Thiago, please don't misunderstand my criticism, I love Qt and have full
respect for qt developers, especially for you, and I just want Qt to be the
best library in our galaxy  :)


cheers,
zeljko




More information about the Qt-interest-old mailing list