New issue
Advanced search Search tips

Issue 636689 link

Starred by 3 users

Issue metadata

Status: Assigned
Owner:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 2
Type: Bug



Sign in to add a comment

Primary display don't get updated when changed on Linux

Reported by elazar.l...@ravellosystems.com, Aug 11 2016

Issue description

UserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36

Steps to reproduce the problem:
1. Start chrome on a laptop with no monitors plugged in.
2. Plug in a second monitor.
3. Set the second monitor as primary, with, e.g., xrandr.
4. Receive a desktop notication, e.g., http://ttsvetko.github.io/HTML5-Desktop-Notifications/

What is the expected behavior?
The desktop notification should be displayed on the current primary display.

What went wrong?
The desktop notification is displayed on the primary display when chrome was started.

Did this work before? N/A 

Chrome version: 52.0.2743.116  Channel: stable
OS Version: 
Flash Version: Shockwave Flash 22.0 r0

This seems to be due to the fact that XRRGetOutputPrimary is called in BuildDisplaysFromXRandRInfo().

See

https://cs.chromium.org/chromium/src/ui/views/widget/desktop_aura/desktop_screen_x11.cc?rcl=0&l=306

And it looks like the displays list is built only on startup.

The call hierarchy shows ConfigureTimerFired() and DesktopScreenX11() ctor are only called from tests and at startup.
 

Comment 1 by elaz...@gmail.com, Sep 6 2016

Hi,

Is there anything new about this issue?

Can I send a patch?
Cc: e...@chromium.org
Owner: thomasanderson@chromium.org
elazarl@ If you have a patch, I'd be happy to take a look.  You can use codereview.chromium.org or just upload the patch as an attached diff here if that's easier.

Comment 4 by elaz...@gmail.com, Sep 6 2016

Hi,

I'm neither an X11 expert, nor Chrome maestro, however it looks like we should listen to XRRScreenChangeNotifyEvent events, as can be seen here:

https://cgit.freedesktop.org/xorg/app/xev/tree/xev.c

I'm not entirely sure how to integrate X11's events into chrome's event loop, and would be happy for a pointer.
We already get XRRScreenChangeNotifyEvents.  We dispatch those here:
https://cs.chromium.org/chromium/src/ui/views/widget/desktop_aura/desktop_screen_x11.cc?rcl=0&l=249

You can probably try taking the second code path with the configure timer all the time and see if that works on your end.
Project Member

Comment 6 by sheriffbot@chromium.org, Sep 7 2017

Status: Archived (was: Unconfirmed)
Issue has not been modified or commented on in the last 365 days, please re-open or file a new bug if this is still an issue.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot

Comment 7 by elaz...@gmail.com, Sep 7 2017

Hi,

Still relevant.

How can I reopen it?
Status: Assigned (was: Archived)

Comment 9 by e...@chromium.org, Mar 9 2018

Cc: -e...@chromium.org
Un-cc-ing me from all bugs on my final day.
Labels: Hotlist-DesktopUIChecked
Status: WontFix (was: Assigned)
***Mass UI Triage***

No notification was displayed as per the URL  http://ttsvetko.github.io/HTML5-Desktop-Notifications/.

Alternatively tested this with https://tests.peter.sh/notification-generator/#tag=1;;notificationCloseEvent=true;;action=4 and this seems to be working fine on the latest Linux Dev 72.0.3610.2. Desktop notification was displayed on the current primary display only.

We were unable to reproduce this bug on the latest Linux dev. If this bug still reproduces for you, 
please reopen or file a new issue. Thanks!
Status: Assigned (was: WontFix)

Sign in to add a comment