Bug 333803 - Kmix popup window appears on second screen, not primary monitor.
Summary: Kmix popup window appears on second screen, not primary monitor.
Status: RESOLVED WORKSFORME
Alias: None
Product: kmix
Classification: Applications
Component: On Hold / External issue (show other bugs)
Version: 4.5
Platform: Ubuntu Linux
: NOR minor
Target Milestone: ---
Assignee: Christian Esken
URL:
Keywords: triaged
: 339622 339675 340627 343393 350838 (view as bug list)
Depends on:
Blocks:
 
Reported: 2014-04-24 05:09 UTC by ztowfic
Modified: 2021-02-08 16:57 UTC (History)
30 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
fix for align issue (780 bytes, patch)
2014-08-15 14:31 UTC, Dmitry Osipenko
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ztowfic 2014-04-24 05:09:28 UTC
When I press the volume (kmix) icon, the popup screen appears, just not above the button itself, but on the secondary monitor. 

Reproducible: Always

Steps to Reproduce:
1. I have the latest Ubuntu 14.04 with KDE installed. 
2. Press the volume icon at the panel.

Actual Results:  
The popup window will appear on the secondary monitor (left monitor in my case).

Expected Results:  
The popup window should appear above the panel, which is on the right screen.

This didn't used to happen with Ubuntu 13.04. I just updated to Ubuntu 14.04, and this issue appeared.
Comment 1 lnxusr 2014-04-28 18:11:37 UTC
I can confirm this as well.  Occurs both on my desktop with NVIDIA and laptop with ATI graphics.

Both systems are set to make right monitor primary (external monitor on the laptop).  When I change primary to left monitor (default in KDE), kmix popup appears above the volume icon as it should.
Comment 2 Uzair Shamim 2014-05-03 19:41:15 UTC
Just wanted to add that this happens to me too on openSUSE 13.1 with KDE 4.13
Comment 3 Joel 2014-05-05 08:54:42 UTC
I confirm that bug too, on Arch Linux 64bit with the lastest KDE 4.13.
When I click on the kmix icon in the systray, the window with volume settings appears on the external monitor (although the primary output is set to be the laptop monitor).
Comment 4 Mauricio 2014-06-02 14:42:06 UTC
I can confirm this on Kubuntu 14.04 (KDE 4.13) with intel graphics. I have my primary monitor as the external monitor so my panel is on my external display, but the kmix pop-up appears on my laptop monitor and not below the panel as it should.
Comment 5 Craig 2014-06-17 00:03:12 UTC
I can confirm this is still happening as well, Arch Linux 64bit with the latest KDE 4.13.2
With 4 monitors on 1 graphic card (nvidia prop. driver), third one from the left is my primary and has always been - this issue seemed to come from no where as never had a problem prior and never changed the monitors or setup/default/etc. All of a sudden possibly just the past few weeks or more (maybe 4.13.2 update or 4.13 in general) I realized when clicking the volume kmix icon in task bar the slider/popup opens on the 1st monitor (far left) NOT my default even though this never used to happen and beyond KDE updates have not changed anything. Again this is on a desktop with static monitors/never changing/etc.

Hopefully can get figured as been driving me up the wall:) Thanks guys!
Comment 6 Craig 2014-06-17 00:06:40 UTC
Also RE last comment (damn no editing) - have tried restarting kmix, starting a new KDE session, killing it outright and re-opening, etc. Also note it may have been in the past month or TWO not just the past month as that is just when I noticed it but the timing of other posts leads me to believe around the past 2 months a kmix update somehow broke that functionality with multi monitor setups unless your primary is also the left-most. Thanks guys!
Comment 7 Dmitry Osipenko 2014-07-31 08:25:50 UTC
*** This bug has been confirmed by popular vote. ***
Comment 8 Christian Esken 2014-08-12 19:35:34 UTC
Developer speaking: I have run KMix for about 2 years on two monitors, and it has never happened for me. But probably my setup was different (2 screens vs big virtual desktop, or tray on different screen).

Still, I have seen a possible issue in the code. I am committing the code in a minute and will put the ticket in "Feedback" status, until someone can test the change. The change may make it work better or worse, or fix the issue for some users and break it for others. This MUST be tested!!!

--- Detailed explanation ------------------
KMix picks the screen by using the popup as reference. But the popup might initially be on the wrong screen. Thus, once on the wrong screen, it will remain on  the wrong screen forever. I now changed the code to use the current mouse click position as reference.
Comment 9 Christian Esken 2014-08-12 19:38:42 UTC
Git commit e6cb7268428c4b835052ac97f0b7892976bdb8ee by Christian Esken.
Committed on 12/08/2014 at 19:36.
Pushed by esken into branch 'master'.

Tray popup / SoundMenu : Select the screen to show by using the given
position instead of a (potentially wrong) reference widget.

M  +8    -8    gui/kmixdockwidget.cpp

http://commits.kde.org/kmix/e6cb7268428c4b835052ac97f0b7892976bdb8ee
Comment 10 Christian Esken 2014-08-12 19:39:56 UTC
Someone affected. Please test (either trunk or KDE4.14 once available)
Comment 11 Dmitry Osipenko 2014-08-12 20:26:34 UTC
I've tested patch on gentoo 4.13.3 and popup appears on primary display, but with auto-hide panel it's aligned to the bottom of screen instead of panel top.
Comment 12 Dmitry Osipenko 2014-08-12 20:45:46 UTC
Same align issue with git trunk.
Comment 13 gurpal2000 2014-08-14 10:08:22 UTC
For time being a workaround would be to go into kmix config -> Sound Menu -> Dock in system tray OFF. Next find kmix on your kde menu, right click and Add To Panel. Essentially you create your own panel shortcut button. It launches kmix - just position it where you want and close. Next time you hit the button, kde will remember the window position (it does on mine). Eagerly waiting for the real solution!
Comment 14 Dmitry Osipenko 2014-08-14 10:22:12 UTC
Or, like I do, just use older 4.4 kmix. So no real trouble here.
Comment 15 Christian Esken 2014-08-14 21:15:50 UTC
Honestly, I have no idea how to fix this. I also tried to completely remove my positioning calculation code and let KDE do the math. In that case, the popup always opens at top-left screen position.

Should somebody know how to properly handle KStatusNotifierItem, please let me know. For now, I am putting the bug in state on-hold. Should there be no help within the next months, I will likely close this bug, unfixed.
Comment 16 Dmitry Osipenko 2014-08-15 09:57:47 UTC
I've bisected issue to commit 0f7a603e1d327f76dbd6a62d08315b1956794d42 ("Configuration menu is now using Tabs to provide a more standard..."). Reverting files "kmixdockwidget.cpp/h" to previous commit c348c90dd15b5e1a155c6a75a2773197dfb97468 fixes issue, i.e. popup displays on active display (tested both) and align is correct.
Comment 17 Dmitry Osipenko 2014-08-15 14:31:37 UTC
Created attachment 88268 [details]
fix for align issue

So, patch for align issue is here.
Comment 18 Christian Esken 2014-09-22 22:15:23 UTC
@digetx@gmail.com Your patch is unfortunately not a generic solution, as it messes up the position if you have a vertical panel. Half height must be kept. A correct solution would likely do something with the section right below starting with the "Now handle Multihead displays." comment. As I don't own mullti-head I wrote that code mainly blindly without a test possibility - I cannot debug that code.
Comment 19 Dmitry Osipenko 2014-09-22 22:49:33 UTC
I suppose align issue isn't related to multihead, just checked it with second monitor disconnected and disabled in kde display config. You can reproduce it by making horizontal panel auto-hide.
Comment 20 Zopieux 2014-10-04 12:54:35 UTC
My two cents: I can confirm this issue on Arch x64 3.16.3-1 and kdemultimedia-kmix 4.14.1-1. Primary screen is laptop, on the right, but panel pops up on the left VGA screen.
Comment 21 Juan Navarro 2014-10-24 14:35:24 UTC
Another vote and another confirmation of this bug; here in Linux Mint 17 KDE Edition (based on Ubuntu 14.04).
KDE version 4.13.3.

The KMix popup doesn't follow the Primary Output as set up in System Settings -> Display Configuration.

Other panel items that work fine are the Network Management and the Device Notifier; both of them create a popup in the correct area next to their panel positions. Why doesn't KMix create a panel on the same way? (which is what one kinda expects given that the KMix is on the same logical level on the other mentioned, all inside the System Tray).
Comment 22 Christoph Feck 2014-11-01 17:50:12 UTC
Christian, your commit from comment #9 went to master after KDE/4.14 branch was created, so 4.14 releases do not have this commit.

I suggest to check if 14.12 release is still affected, a first beta should be available next week.
Comment 23 Christoph Feck 2014-11-16 17:20:19 UTC
*** Bug 340627 has been marked as a duplicate of this bug. ***
Comment 24 Xu Zhao 2014-11-16 18:57:45 UTC
Same problem on KDE 4.14.2, openSUSE 13.2.

I have two monitors, the kmix volume popup always shows on secondary output instead of primary one.
Comment 25 Xu Zhao 2014-11-16 18:58:05 UTC
Same problem on KDE 4.14.2, openSUSE 13.2.

I have two monitors, the kmix volume popup always shows on secondary output instead of primary one.
Comment 26 Christoph Feck 2014-11-16 19:08:29 UTC
Xu, comment #22 says that the fix missed 4.14. Please test 14.12.
Comment 27 Grzegorz Krugły 2014-12-04 10:54:34 UTC
A workaround for older distros might be to remove KMix from the tray and use Veromix instead. It can be placed inside the tray, too. It integrates with the plasma theme better in my opinion and doesn't have the multiple monitor problem.
Comment 28 Benjamin Robin 2014-12-12 13:22:06 UTC
I did test using VirtualBox configured with 2 screens:
 - kmix-4.14.3 has still the issue (doesn't contain the fix)
 - kmix, today git build, seems to work fine
Comment 29 kjackie 2014-12-24 16:42:46 UTC
I have this issue with 4.14.3, while 4.12.5 was good.
Manually applied e6cb7268428c4b835052ac97f0b7892976bdb8ee on top of 4.14.3 fixed it for me.

However, it's still on wrong screen if clicking "Restore" from the context menu.
Comment 30 Dmitry Osipenko 2015-01-22 14:09:29 UTC
(In reply to Christian Esken from comment #18)
> @digetx@gmail.com Your patch is unfortunately not a generic solution, as it
> messes up the position if you have a vertical panel. Half height must be
> kept. A correct solution would likely do something with the section right
> below starting with the "Now handle Multihead displays." comment. As I don't
> own mullti-head I wrote that code mainly blindly without a test possibility
> - I cannot debug that code.

I'm using vertical panel for more than month now with my patch applied and haven't noticed any problems with it. I.e. popup window position is always where I expect it to be.
Comment 31 Christoph Feck 2015-01-27 21:41:21 UTC
*** Bug 343393 has been marked as a duplicate of this bug. ***
Comment 32 Tiger 2015-05-16 15:47:56 UTC
Hello,
I had the issue for a while now on Gentoo since using dual screen setup (xinerama).
My configuration is a vertical taskbar on left screen and horizontal taskbar on main screen to the right. The kmix popup dock window was shown correctly on left screen but then appear in the bottom right corner of the same screen while activate it on the other screen (right/main screen).

Screenshot of the desktop :
> http://i.imgur.com/KRY2vMf.jpg

The issue is now solved, thanks to the e6cb7268 Revision :
https://projects.kde.org/projects/kde/kdemultimedia/kmix/repository/revisions/e6cb7268428c4b835052ac97f0b7892976bdb8ee/diff/gui/kmixdockwidget.cpp

Need feedbacks to know if that solve it in every kind of configuration.
Comment 33 Andrew Crouthamel 2018-09-26 22:23:27 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information as soon as possible and set the bug status as REPORTED. Due to regular bug tracker maintenance, if the bug is still in NEEDSINFO status with no change in 30 days, the bug will be closed as RESOLVED > WORKSFORME due to lack of needed information.

For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please set the bug status as REPORTED so that the KDE team knows that the bug is ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 34 Andrew Crouthamel 2018-10-27 03:42:00 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least 30 days. The bug is now closed as RESOLVED > WORKSFORME due to lack of needed information.

For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!
Comment 35 Jonathan Marten 2021-02-08 16:34:42 UTC
*** Bug 339622 has been marked as a duplicate of this bug. ***
Comment 36 Jonathan Marten 2021-02-08 16:34:57 UTC
*** Bug 339675 has been marked as a duplicate of this bug. ***
Comment 37 Jonathan Marten 2021-02-08 16:48:16 UTC
*** Bug 350838 has been marked as a duplicate of this bug. ***