Open GoogleCodeExporter opened 9 years ago
The problem is because QWit's main window is a QDialog and not QMainWindow.
MacOS
treats Dialogs differently than non-dialogs.
Other problem with QDialog approach is that QWit does not behave normally when
"expose" is done.
Going forward someday if we want QWit to function correctly on Mac, we might
have to
convert the Mainwindow inherit from QMainWindow instead of QDialog.
Original comment by prakash....@gmail.com
on 7 Mar 2010 at 5:38
Attached is a diff file for the change. The Mainwindow is converted to
QMainWindow
type instead of QDialog. QMainWindow makes Qwit window behave like other regular
application on mac.
If you need help in integrating the change, please let me know.
Original comment by prakash....@gmail.com
on 7 Mar 2010 at 2:47
Attachments:
Not sure if you get to know about the ticket messages without you being on CC?
Original comment by prakash....@gmail.com
on 7 Mar 2010 at 2:48
Original comment by prakash....@gmail.com
on 7 Mar 2010 at 6:02
I'm getting messages, even without CC
Original comment by artem.iglikov
on 8 Mar 2010 at 3:21
Applied in r318. Thanks!
Original comment by artem.iglikov
on 8 Mar 2010 at 5:11
I am attaching another diff, due to new behaviour after we changed the window
from
QDialog to QMainWindow.
As I see, this is a significant better window show/hide management on Mac and
also it
is inline with other applications that do similar thing as QWit.
The only thing missing is ability to show Qwit when the application icon is
clicked
on the Dock after it has been hidden. Unfortunately after reading many Qt doc, i
could not find an event that would take care of that. One doc suggested to write
native mac code to handle the event from Dock. It is perfectly doable but I
will need
more time for that.
This change would address immidiate problem of window visibility management on
mac.
The idea is that unlike windows, the trayicon can be activity with rt-click
(menu) or
lt-click. On mac, either key on the trayicon does the same thing, i.e. pop the
context menu. This makes it bad UX.
Hope you are satisfied with the explanation. I can not test with linux
environment, I
hope you could do that for me.
Thanks.
Original comment by prakash....@gmail.com
on 13 Mar 2010 at 5:52
Attachments:
On my KDE system, after changing isVisible() to isVisible() && isActiveWindow()
in
showhide(), if Qwit is not active and not on top, it's needed to press the icon
twice
to hide the window. Do we really need this change? Other things work correctly
Original comment by artem.iglikov
on 13 Mar 2010 at 7:58
Yes, that is what happens on mac as well. Most of the time QWit window is
behind a
browser or other window that is larger than QWit window. So you have to click
the
icon twice to bring it forward.
The idea is that you only need to click the icon once to see the window. I would
assume (me being a typical end user) would click the tray icon to type a new
message
or read new message when the trayicon indicates new message arived, rather than
to
hide the window. The close button would be used to hide the window instead, so
the
window should comeup as soon as the user as clicked on the trayicon.
1. If the window is visible but not activated, then make it active for the user
to
interact with it. Typically hidden behind a browser or other application.
2. If the window is not visible make it visible and activate it.
2. If the window is visible and active, clicking on the staysicon or close
button
would hide the window.
What do you think?
Original comment by prakash....@gmail.com
on 13 Mar 2010 at 8:13
Yes, I would prefer to click once on the tray icon to see the window (no
matter, if
it's hidden or in background), and I thought about it from the beginning, but
the
problem is that 'active window' and even 'visible window' is not the same as
'window,
visible to user'. Activating the backgrounded window doesn't bring it in
foreground
in my case (and I spent much time to find the solution, but didn't succeed).
So, if
before the patch I had to click the icon twice to bring the Qwit from
background (one
to hide, and then one to show), now I had to click it three(!) times (one to
activate, one to hide, one to show). Possibly, it's only linux, or even, only
KDE
related problem, but it's a problem :)
Original comment by artem.iglikov
on 13 Mar 2010 at 8:33
Humm, I am sorry about that. Now you have made me to want to install Linux :).
Which Linux should I install? Ubuntu 9.10?
Original comment by prakash....@gmail.com
on 13 Mar 2010 at 9:04
Yes, definitely Ubuntu 9.10 ! :-)
(Ubuntu 10.04 will arrive in less than a month, but upgrading is easy..!)
Original comment by ceefour666@gmail.com
on 30 Mar 2010 at 1:52
Thanks, i do not have a spare computer for linux, The ubuntu does not like my
Mac
build version (as per their page)
btw, the change also solves the problem in windows. without my change, even in
windows, i have to click twice to bring the window into focus.
Original comment by prakash....@gmail.com
on 30 Mar 2010 at 2:14
Original issue reported on code.google.com by
prakash....@gmail.com
on 6 Mar 2010 at 8:15