Bug 172277 - Right click, "show mixer window", mixer pop-up appears at (0,0) instead of next to kmix icon
Summary: Right click, "show mixer window", mixer pop-up appears at (0,0) instead of ne...
Status: RESOLVED FIXED
Alias: None
Product: kmix
Classification: Applications
Component: KMix Panel Docking (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: VHI normal
Target Milestone: ---
Assignee: Christian Esken
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-10-06 14:45 UTC by Alan Jenkins
Modified: 2011-01-02 16:54 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Proposed fix (3.47 KB, patch)
2008-10-07 17:02 UTC, Alan Jenkins
Details
Proposed fix (correct version) (3.65 KB, patch)
2008-10-07 20:08 UTC, Alan Jenkins
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alan Jenkins 2008-10-06 14:45:06 UTC
Version:            (using KDE 4.1.2)
OS:                Linux
Installed from:    Ubuntu Packages

This only happens when kmix is first started.  It doesn't happen if you have left-clicked on the icon beforehand.

In other words it looks like this codepath is missing the command to set the popup window location.
Comment 1 Alan Jenkins 2008-10-06 14:45:53 UTC
Um.  Looks like my title was truncated.  Here:

Right click, "show mixer window", mixer pop-up appears at (0,0) instead of next to kmix icon.
Comment 2 Alan Jenkins 2008-10-07 10:47:40 UTC
Actually, I think this menu item is doing the wrong thing altogether.  It should be equivalent to clicking "mixer" on the popup and bring up the full window with all the sliders, instead of just showing the popup.
Comment 3 Alan Jenkins 2008-10-07 14:27:49 UTC
Eww.  I see QT made this harder to implement for no apparent reason.

I guess we need replace the default "minimizeRestore" action on the context menu with our own.
Comment 4 Alan Jenkins 2008-10-07 17:02:55 UTC
Created attachment 27732 [details]
Proposed fix

Here's the code.
Comment 5 Alan Jenkins 2008-10-07 20:08:37 UTC
Created attachment 27738 [details]
Proposed fix (correct version)

Sorry, here's the version I actually meant to send.
Comment 6 Christian Esken 2008-10-27 01:59:03 UTC
I have tried to reproduce it with a version built today (KDE trunk). I cannot reproduce the problem. Could you please try it again.

Also using an own KMenu is a very invasive action in the DockArea - it is VERY easy to break things that you would not imagine, like not saveing the configuration when quitting from the DockArea. In KDE3 I counted 18 test cases, which means several hours of very very boring testing.

About the "doing the wrong thing altogether"; I might agree, but I would need to check old mail threads on this before going this way. I currently have 20 other bugs open, so please try it again first, and report back.
Comment 7 Alan Jenkins 2008-10-27 09:36:43 UTC
I can still reproduce $SUBJECT here.  If you me to update, you either need to point me to a binary or wait until I can download Ubuntu Intrepid.

Steps -
1. Make sure "Enable system tray volume control" is ticked.
2. Log in & back out again to restart kmix.
3. As your first action, right click on the kmix system tray icon and click "show mixer".
4. Observe that the system tray volume control appears at top left, instead of next to the system tray icon.

I don't see how this could have been fixed outside kmix.
Comment 8 Alan Jenkins 2008-10-27 09:40:37 UTC
I think it's clear that the UI does the wrong thing altogether.  When you select a menu item called "Show mixer window", you don't expect to get a dinky popup showing a single channel.

I understand that it's not so clear how the implementation can be fixed though :).
Comment 9 Christian Esken 2008-11-08 13:22:59 UTC
If you don#t like that "dinky" window, then just disable it in the configuration dialog of KMix.
Comment 10 Alan Jenkins 2008-11-08 13:54:44 UTC
I'm not saying I don't like it personally.  I just think it's generally buggy.  I understand you've not marked this resolved, so you can ignore the following rant :).



I would assert that *no-one* expects, after right-clicking on the kmix icon and clicking a particular item from the pop-up menu, to get another pop-up.  They expect either an immediate action, or a conventional dialogue box / window.

Popups don't spawn other popups - everyone knows nested menus, but that's it.  And this is the default configuration; the user hasn't elected to be confused.

Many medium-level users want to look at the full mixer window at least once.  In fact, you also have to start from the full mixer window if you want to change the configuration for the system tray icon.  And if you're used to right clicking on system tray icons, the sequence would be

1) Right click on kmix icon
2) Click "show mixer window" in popup menu
3) Click "Mixer" on volume popup

That's just perverse.

I'm probably used to the right-click more because knetworkmanager requires a right-click to select which wireless network to connect to.
Comment 11 Christian Esken 2008-12-07 18:40:01 UTC
Alan,

I checked back my mail threads about this, and they don't say anything final about the context menu (only about the left click, which should be "show master popup" by default).

Also, I said I might agree, which I do outright: This is a bug, a "side-effect" of the "reference widget" concept. I also agree on your idea to "replace" the "minimizeRestore" action. And I just saw that it really looks neccesary to use our own KMenu, like in your patch. The test cases (e.g. saving config, quit/close issues, restore/visibility issues) will take some time, and I don't dare too submit the change without a longer test period. Which means, unfortunately, to put this in KDE4.3 and not in KDE 4.2.

About your comment #7: I followed your instructions word by word (hopefully), but still cannot reproduce it. Anyhow, this should be re-tested with the new behaviour anyways (new test case).

   Christian
Comment 12 Alan Jenkins 2009-04-24 19:18:16 UTC
Update: on Kubuntu 9.04, I don't get the $SUBJECT weirdness.  I followed my steps to reproduce again, and the popup appears in the correct place.
Comment 13 Christian Esken 2009-07-05 16:44:28 UTC
I believe I just saw someone did a patch for the issue described in comment #8. For the other thing, I was able to reproduce it with a 4.2 beta/trunk release. But now with recent "KDE4.3 RC's" and "in-work KDE 4.4" I cannot reproduce it.

It is really very strange. I do propose this. If the issue described in comment #8 is fixed, and we can't reproduce the (0,0) issue until end of July 2009, lets close this bug report.

Closing postponed to end of July 2009.
Comment 14 Christian Esken 2009-07-05 17:03:50 UTC
New plan: There is a patch for the Popup in KDE4.4:
http://websvn.kde.org/?view=rev&sortby=date&revision=980559

It changes the popup significally, and might fix the described
behaviour.

I'll observe this a while in the KDE4.4 branch. Lets look at this again in
September 2009.
Comment 15 Jo Schulze 2010-04-08 00:40:54 UTC
This issue still persist in KDE 4.4.2 
Unlike the OP this still happends when the Mixer window has been opened before, so AFAICS there is no progress here at all.
Comment 16 Christian Esken 2010-04-08 10:20:09 UTC
I can now reproduce it in KDE4.4.2. I will take a look at it:
- Try to debug the shipped version
- Compile from source (4.4 and trunk)
Comment 17 Martin Bednar 2010-05-16 00:59:26 UTC
still present in 4.4.3 and 4.4.75, no amount of left-clicking gets the "show mixer window" popup to the right place.  (left-clicking alone works great though). just adding my $0.02 : I too think that "show mixer window" should actually show the mixer window, not just the Master channel.
Comment 18 Martin Bednar 2010-05-16 01:02:16 UTC
sorry, just found the bug for that : https://bugs.kde.org/show_bug.cgi?id=191477, maybe they're somehow linked?
Comment 19 Christian Esken 2010-08-20 23:21:00 UTC
Yes, they are 100% linked (but not duplicates).
This is very tricky to fix. Likely it won't be possible without a change in kdelibs. I am getting kde-core-devel into this, and also have reopened bug 191477.
Comment 20 Jo Schulze 2010-08-21 20:05:43 UTC
> This is very tricky to fix. Likely it won't be possible without a change in
> kdelibs.
Which kind of fix is tricky? Positioning the popup at the correct position (like a left-click does) or show the detailed mixer window (instead of the popup as suggested in comment #17 which makes perfectly sense for me)?
Comment 21 Christian Esken 2010-08-23 00:41:14 UTC
It is not trivial to explain. For details, please see http://lists.kde.org/?l=kde-core-devel&m=128233309030737&w=2
Comment 22 oneforall 2010-09-04 09:55:26 UTC
kde 4.5.1 I do right click >pick show mixer window and its putting it to the top left (0:0). But its not the on it should be its like a left click showing the pcm and mixer button.. the left click and mixer button puts the mixer off to the bottom right and off screen. It seem to work fine after you position it thou
Comment 23 Christian Esken 2011-01-02 14:52:19 UTC
SVN commit 1210866 by esken:

KMix Tray icon: 
Urgent fix. KMix was unusable when you disable the tray icon (once hidden you would never get the KMix Window back, even after logging out and in again). Fix behaviour of Volume popup and main  window
BUGS: 172277
BUGS: 191477
BUGS: 258951

 M  +6 -5      apps/KMixApp.cpp  
 M  +37 -40    gui/kmixdockwidget.cpp  
 M  +5 -1      gui/kmixdockwidget.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1210866
Comment 24 Christian Esken 2011-01-02 16:54:25 UTC
SVN commit 1210896 by esken:

KMix Tray icon fixed (patch forwarded to trunk from 4.6 branch):
KMix was unusable when you disable the tray icon (once hidden you would never get the KMix Window back, even after logging out and in again). Fix behaviour of Volume popup and main  window
BUGS: 172277
BUGS: 191477
BUGS: 258951

 M  +6 -5      apps/KMixApp.cpp  
 M  +36 -40    gui/kmixdockwidget.cpp  
 M  +5 -1      gui/kmixdockwidget.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1210896