Chromium window does not take keyboard focus after opening address from commandline
Reported by
harvi...@gmail.com,
Mar 9 2016
|
||
Issue descriptionUserAgent: Mozilla/5.0 (X11; Linux i686 (x86_64)) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.75 Safari/537.36 Steps to reproduce the problem: 1. Open chromium, few websites in tabs, whatever... 2. Open terminal and execute "chromium http://somesite.com/" from commandline 3. Press CTRL+W (as you would do to close new somesite.com tab) 4. type "echo omg" and enter What is the expected behavior? I would expect that after opening new tab from commandline chromium would acquire focus. ctrl+w would close browser tab and "echo omg" would go to browser (if there are some tabs left). What went wrong? Instead of this ctrl+w and "echo omg" goes to terminal. Even if terminal is on background and browser is maximized on top. This is really annoying as it does the same eg. when i click on the link in IM (Pidgin in my case). I receive link on image (http://somesite/someimage.jpg), i click on it and pidgin opens chromium and displays the image. after i've seen enough of the image i proceed to press ctrl+w which should close the tab with image. BUT IT CLOSES THE PIDGIN TAB INSTEAD!!! At this time i don't know that pidgin closed the tab at background, but i just wonder why chromium tab was not closed. So i may pres ctrl+w few more times (closing few more tabs in background pidgin!). This have been annoying me for years. Please fix it. BTW i use XFCE4, but it should not matter. Other apps acquire keyboard focus correctly. Did this work before? No Chrome version: 49.0.2623.75 Channel: n/a OS Version: Flash Version: Shockwave Flash 20.0 r0
,
Apr 18 2016
IIRC, when you use the command line to interact with an existing browser, it sends an ipc over a pipe. Can you push the current user time from the instance of chrome on the command line to the long lived chrome process?
,
Apr 19 2016
I agree that would be the right thing to do. But, the short-lived chrome process doesn't have the time from the X server stored in wm_user_time_ms_ because the user never gets a chance to interact with the browser. Also, the timestamp given by the X server is relative to when the X process started, so we can't just use gettimeofday() or similar. Is there any way to ask the X server for the timestamp, or is there a timestamp that might be stored somewhere that I don't know about?
,
May 17 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/ca3656dc321be956db788c5fc8ee16cd20ed6d86 commit ca3656dc321be956db788c5fc8ee16cd20ed6d86 Author: thomasanderson <thomasanderson@google.com> Date: Tue May 17 02:02:50 2016 X11: Better timestamp handling for _NET_ACTIVE_WINDOW Main changes introduced: 1. Get the X server timestamp in the newly created browser process and send it over IPC to the old process to update wm_user_time_ms 2. Add logic in set_wm_user_time_ms to avoid setting the time to 0 (or backwards) 3. If wm_user_time_ms == 0 and we try to activate a window, grab the server time first BUG= 593516 , 608521 , 379615 Review-Url: https://codereview.chromium.org/1949393007 Cr-Commit-Position: refs/heads/master@{#394018} [modify] https://crrev.com/ca3656dc321be956db788c5fc8ee16cd20ed6d86/chrome/browser/chrome_browser_main_extra_parts_x11.cc [modify] https://crrev.com/ca3656dc321be956db788c5fc8ee16cd20ed6d86/chrome/browser/ui/startup/startup_browser_creator.cc [modify] https://crrev.com/ca3656dc321be956db788c5fc8ee16cd20ed6d86/chrome/common/chrome_switches.cc [modify] https://crrev.com/ca3656dc321be956db788c5fc8ee16cd20ed6d86/chrome/common/chrome_switches.h [modify] https://crrev.com/ca3656dc321be956db788c5fc8ee16cd20ed6d86/tools/metrics/histograms/histograms.xml [modify] https://crrev.com/ca3656dc321be956db788c5fc8ee16cd20ed6d86/ui/events/platform/x11/x11_event_source.cc [modify] https://crrev.com/ca3656dc321be956db788c5fc8ee16cd20ed6d86/ui/events/platform/x11/x11_event_source.h [modify] https://crrev.com/ca3656dc321be956db788c5fc8ee16cd20ed6d86/ui/views/widget/desktop_aura/x11_desktop_handler.cc [modify] https://crrev.com/ca3656dc321be956db788c5fc8ee16cd20ed6d86/ui/views/widget/desktop_aura/x11_desktop_handler.h
,
May 17 2016
|
||
►
Sign in to add a comment |
||
Comment 1 by thomasanderson@chromium.org
, Apr 18 2016Status: Available (was: Unconfirmed)