|
|
Created:
6 years, 1 month ago by Tomasz Moniuszko Modified:
6 years ago Reviewers:
sky CC:
chromium-reviews, tfarina Base URL:
https://chromium.googlesource.com/chromium/src.git@master Project:
chromium Visibility:
Public. |
DescriptionMake sure new maximized window gets activated
BUG=401818
TEST=Maximize window and start typing in omnibox. Open new window from jump list. Check if new window is active and it's possible to type in omnibox.
Committed: https://crrev.com/c0910ccc3203bbb8c547adba408e49cebca288e5
Cr-Commit-Position: refs/heads/master@{#306359}
Patch Set 1 #
Total comments: 3
Messages
Total messages: 15 (3 generated)
tmoniuszko@opera.com changed reviewers: + sadrul@chromium.org, sky@chromium.org
Can you add a test case?
sadrul@chromium.org changed reviewers: - sadrul@chromium.org
[ Removing myself from reviewer list since Windows, sky@ is OWNER ]
On 2014/11/14 17:51:46, sky wrote: > Can you add a test case? I added TEST line to description. Did you mean adding an unit test? I don't see unit tests for HWNDMessageHandler. I think it may be difficult to write unit tests because HWNDMessageHandler calls Win API functions and needs a valid HWND.
https://codereview.chromium.org/725953002/diff/1/ui/views/win/hwnd_message_ha... File ui/views/win/hwnd_message_handler.cc (right): https://codereview.chromium.org/725953002/diff/1/ui/views/win/hwnd_message_ha... ui/views/win/hwnd_message_handler.cc:643: Activate(); I think you're working around a problem that may be else where in the code. Does this also happen when showing non-maximized? If Chrome is already running and you click a shortcut then I believe we end up passing a message to chrome. Do we need to do something else to ensure the existing chrome ends up as the active/focused app?
https://codereview.chromium.org/725953002/diff/1/ui/views/win/hwnd_message_ha... File ui/views/win/hwnd_message_handler.cc (right): https://codereview.chromium.org/725953002/diff/1/ui/views/win/hwnd_message_ha... ui/views/win/hwnd_message_handler.cc:643: Activate(); On 2014/11/24 16:23:07, sky wrote: > I think you're working around a problem that may be else where in the code. > Does this also happen when showing non-maximized? No it doesn't because Activate() is being called from HWNDMessageHandler::ShowWindowWithState(). It does when I remove Activate() call from that method. If new window is opened from jumplist while existing window is maximized, HWNDMessageHandler::ShowMaximizedWithBounds() is called instead of ShowWindowWithState() so calling Activate() from here is just analogous solution.
On Thu, Nov 27, 2014 at 7:35 AM, <tmoniuszko@opera.com> wrote: > > https://codereview.chromium.org/725953002/diff/1/ui/views/win/hwnd_message_ha... > File ui/views/win/hwnd_message_handler.cc (right): > > https://codereview.chromium.org/725953002/diff/1/ui/views/win/hwnd_message_ha... > ui/views/win/hwnd_message_handler.cc:643: Activate(); > On 2014/11/24 16:23:07, sky wrote: >> >> I think you're working around a problem that may be else where in the > > code. >> >> Does this also happen when showing non-maximized? > > > No it doesn't because Activate() is being called from > HWNDMessageHandler::ShowWindowWithState(). It does when I remove > Activate() call from that method. I'm surprised that works as the process we're calling Active() from isn't the foreground process. > > If new window is opened from jumplist while existing window is > maximized, HWNDMessageHandler::ShowMaximizedWithBounds() is called > instead of ShowWindowWithState() so calling Activate() from here is just > analogous solution. > > https://codereview.chromium.org/725953002/ To unsubscribe from this group and stop receiving emails from it, send an email to chromium-reviews+unsubscribe@chromium.org.
LGTM https://codereview.chromium.org/725953002/diff/1/ui/views/win/hwnd_message_ha... File ui/views/win/hwnd_message_handler.cc (right): https://codereview.chromium.org/725953002/diff/1/ui/views/win/hwnd_message_ha... ui/views/win/hwnd_message_handler.cc:643: Activate(); On 2014/11/27 15:35:50, Tomasz Moniuszko wrote: > On 2014/11/24 16:23:07, sky wrote: > > I think you're working around a problem that may be else where in the code. > > Does this also happen when showing non-maximized? > > No it doesn't because Activate() is being called from > HWNDMessageHandler::ShowWindowWithState(). It does when I remove Activate() call > from that method. Ah, ok, I get it. > > If new window is opened from jumplist while existing window is maximized, > HWNDMessageHandler::ShowMaximizedWithBounds() is called instead of > ShowWindowWithState() so calling Activate() from here is just analogous > solution. I don't think you need the comment here. We should activate just as we do in the
On 2014/12/01 17:11:45, sky wrote: > LGTM > > https://codereview.chromium.org/725953002/diff/1/ui/views/win/hwnd_message_ha... > File ui/views/win/hwnd_message_handler.cc (right): > > https://codereview.chromium.org/725953002/diff/1/ui/views/win/hwnd_message_ha... > ui/views/win/hwnd_message_handler.cc:643: Activate(); > On 2014/11/27 15:35:50, Tomasz Moniuszko wrote: > > On 2014/11/24 16:23:07, sky wrote: > > > I think you're working around a problem that may be else where in the code. > > > Does this also happen when showing non-maximized? > > > > No it doesn't because Activate() is being called from > > HWNDMessageHandler::ShowWindowWithState(). It does when I remove Activate() > call > > from that method. > > Ah, ok, I get it. > > > > > If new window is opened from jumplist while existing window is maximized, > > HWNDMessageHandler::ShowMaximizedWithBounds() is called instead of > > ShowWindowWithState() so calling Activate() from here is just analogous > > solution. > > I don't think you need the comment here. We should activate just as we do in the Sorry for the noise. Ignore this last note and leave the comment you have.
The CQ bit was checked by tmoniuszko@opera.com
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/725953002/1
Message was sent while issue was closed.
Committed patchset #1 (id:1)
Message was sent while issue was closed.
Patchset 1 (id:??) landed as https://crrev.com/c0910ccc3203bbb8c547adba408e49cebca288e5 Cr-Commit-Position: refs/heads/master@{#306359} |