Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(314)

Issue 1707233002: Reduce the fullscreen window height by 1px on activation loss. (Closed)

Created:
4 years, 10 months ago by ananta
Modified:
4 years, 10 months ago
Reviewers:
sky
CC:
chromium-reviews, tfarina
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Reduce the fullscreen window height by 1px on activation loss and restore it back on activation gain. This is to workaround a bug/behavior of the Windows taskbar, where in it does not stay as topmost window when a window on a thread which has a fullscreen window is active. The symptom observed in this case is that the windows on the same thread as the fullscreen window end up obscuring the taskbar or cause autohide to not work. The other changes in this patch are as below:- 1. When the bounds of the WinWindow class which serves as the PlatformWindow for the WindowTreeHost instance change, we don't activate it if the underlying HWND is not visible. 2. The WidgetTestInteractive.ViewFocusOnHWNDEnabledChanges test explicitly shows the WindowTreeHost instance which ensures that the HWND is visible and activated. BUG=472139 TEST=Covered by views_unittest Widget.FullscreenBoundsReducedOnActivationLoss Committed: https://crrev.com/ed6530c9ab6cd4a56ffd70612be526dbc7db1552 Cr-Commit-Position: refs/heads/master@{#377084}

Patch Set 1 #

Total comments: 4

Patch Set 2 : Reduce the size of the fullscreen window by 1px on activation loss #

Total comments: 4

Patch Set 3 : Update comments #

Total comments: 2

Patch Set 4 : Move the fullscreen hacks to HWNDMessageHandler #

Total comments: 5

Patch Set 5 : Reset the background fullscreen state member in HWNDMessageHandler::SetBounds and in WM_WINDOWPOSCH… #

Total comments: 2

Patch Set 6 : Combine ifs #

Patch Set 7 : The FullscreenBoundsReducedOnActivationLoss test is now an interactive test as it fails intermittently on the trybots. #

Patch Set 8 : Revert changes to widget_unittest.cc #

Patch Set 9 : Check in OnWindowPosChanging whether the size is changing before resetting the background_fullscree… #

Patch Set 10 : Don't grab activation in the WinWindow class if the window is not visible #

Patch Set 11 : Show the WindowTreeHost in the WidgetTestInteractive.ViewFocusOnHWNDEnabledChanges ui test #

Patch Set 12 : Reorganize the WidgetTest.FullscreenBoundsReducedOnActivationLoss test to make it less flaky #

Patch Set 13 : Make the WidgetNotActivatedOnFakeActivationMessages an interactive ui test #

Patch Set 14 : Revert changes to widget_unittest.cc #

Unified diffs Side-by-side diffs Delta from patch set Stats (+164 lines, -26 lines) Patch
M ui/platform_window/win/win_window.cc View 1 2 3 4 5 6 7 8 9 1 chunk +4 lines, -2 lines 0 comments Download
M ui/views/widget/widget_interactive_uitest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +64 lines, -0 lines 0 comments Download
M ui/views/win/hwnd_message_handler.h View 1 2 3 4 3 chunks +13 lines, -1 line 0 comments Download
M ui/views/win/hwnd_message_handler.cc View 1 2 3 4 5 6 7 8 8 chunks +83 lines, -23 lines 0 comments Download

Messages

Total messages: 38 (14 generated)
ananta
4 years, 10 months ago (2016-02-18 02:34:03 UTC) #2
sky
https://codereview.chromium.org/1707233002/diff/1/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc File ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc (right): https://codereview.chromium.org/1707233002/diff/1/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc#newcode715 ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc:715: // If the window losing activation is a fullscreen ...
4 years, 10 months ago (2016-02-18 17:18:47 UTC) #3
sky
Also, do we need to remember we changed fullscreen and switch back on gaining activation?
4 years, 10 months ago (2016-02-18 17:19:20 UTC) #4
ananta
https://codereview.chromium.org/1707233002/diff/1/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc File ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc (right): https://codereview.chromium.org/1707233002/diff/1/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc#newcode715 ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc:715: // If the window losing activation is a fullscreen ...
4 years, 10 months ago (2016-02-18 20:29:28 UTC) #5
ananta
On 2016/02/18 20:29:28, ananta wrote: > https://codereview.chromium.org/1707233002/diff/1/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc > File ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc (right): > > https://codereview.chromium.org/1707233002/diff/1/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc#newcode715 > ...
4 years, 10 months ago (2016-02-18 20:30:46 UTC) #6
sky
https://codereview.chromium.org/1707233002/diff/1/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc File ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc (right): https://codereview.chromium.org/1707233002/diff/1/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc#newcode715 ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc:715: // If the window losing activation is a fullscreen ...
4 years, 10 months ago (2016-02-18 22:12:41 UTC) #7
ananta
4 years, 10 months ago (2016-02-19 00:50:00 UTC) #9
sky
The bug you site is all about maximized windows, not fullscreen. Are you sure you ...
4 years, 10 months ago (2016-02-19 19:14:49 UTC) #10
ananta
The bug is about maximized windows obscuring the taskbar. If you look at comments in ...
4 years, 10 months ago (2016-02-19 20:07:21 UTC) #11
sky
https://codereview.chromium.org/1707233002/diff/40001/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc File ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc (right): https://codereview.chromium.org/1707233002/diff/40001/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc#newcode712 ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc:712: if (!::IsWindow(window_gaining_or_losing_activation)) Is there a reason not to put ...
4 years, 10 months ago (2016-02-19 21:17:00 UTC) #12
ananta
https://codereview.chromium.org/1707233002/diff/40001/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc File ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc (right): https://codereview.chromium.org/1707233002/diff/40001/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc#newcode712 ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc:712: if (!::IsWindow(window_gaining_or_losing_activation)) On 2016/02/19 21:17:00, sky wrote: > Is ...
4 years, 10 months ago (2016-02-19 21:24:18 UTC) #13
sky
If you move all the state to DesktopWindowTreeHostWin, then I'm ok with it. But if ...
4 years, 10 months ago (2016-02-19 21:27:53 UTC) #14
ananta
On 2016/02/19 21:27:53, sky wrote: > If you move all the state to DesktopWindowTreeHostWin, then ...
4 years, 10 months ago (2016-02-19 21:47:05 UTC) #15
sky
https://codereview.chromium.org/1707233002/diff/60001/ui/views/win/hwnd_message_handler.cc File ui/views/win/hwnd_message_handler.cc (right): https://codereview.chromium.org/1707233002/diff/60001/ui/views/win/hwnd_message_handler.cc#newcode542 ui/views/win/hwnd_message_handler.cc:542: !background_fullscreen_hack()) { Shouldn't SetBounds() reset background_fullscreen_hack_? The SetBounds() called ...
4 years, 10 months ago (2016-02-19 22:30:50 UTC) #16
ananta
https://codereview.chromium.org/1707233002/diff/60001/ui/views/win/hwnd_message_handler.cc File ui/views/win/hwnd_message_handler.cc (right): https://codereview.chromium.org/1707233002/diff/60001/ui/views/win/hwnd_message_handler.cc#newcode542 ui/views/win/hwnd_message_handler.cc:542: !background_fullscreen_hack()) { On 2016/02/19 22:30:50, sky wrote: > Shouldn't ...
4 years, 10 months ago (2016-02-19 23:21:26 UTC) #17
sky
LGTM https://codereview.chromium.org/1707233002/diff/80001/ui/views/win/hwnd_message_handler.cc File ui/views/win/hwnd_message_handler.cc (right): https://codereview.chromium.org/1707233002/diff/80001/ui/views/win/hwnd_message_handler.cc#newcode2199 ui/views/win/hwnd_message_handler.cc:2199: if (monitor_rect.height() - window_pos->cy != 1) nit: combing ...
4 years, 10 months ago (2016-02-19 23:29:24 UTC) #18
ananta
https://codereview.chromium.org/1707233002/diff/80001/ui/views/win/hwnd_message_handler.cc File ui/views/win/hwnd_message_handler.cc (right): https://codereview.chromium.org/1707233002/diff/80001/ui/views/win/hwnd_message_handler.cc#newcode2199 ui/views/win/hwnd_message_handler.cc:2199: if (monitor_rect.height() - window_pos->cy != 1) On 2016/02/19 23:29:24, ...
4 years, 10 months ago (2016-02-20 00:12:49 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1707233002/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1707233002/100001
4 years, 10 months ago (2016-02-20 00:17:38 UTC) #22
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_rel_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_ng/builds/176854)
4 years, 10 months ago (2016-02-20 01:42:55 UTC) #24
sky
SLGTM
4 years, 10 months ago (2016-02-22 23:42:01 UTC) #25
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1707233002/220001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1707233002/220001
4 years, 10 months ago (2016-02-23 03:54:30 UTC) #30
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1707233002/260001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1707233002/260001
4 years, 10 months ago (2016-02-23 20:58:00 UTC) #34
commit-bot: I haz the power
Committed patchset #14 (id:260001)
4 years, 10 months ago (2016-02-23 21:18:17 UTC) #36
commit-bot: I haz the power
4 years, 10 months ago (2016-02-23 21:19:11 UTC) #38
Message was sent while issue was closed.
Patchset 14 (id:??) landed as
https://crrev.com/ed6530c9ab6cd4a56ffd70612be526dbc7db1552
Cr-Commit-Position: refs/heads/master@{#377084}

Powered by Google App Engine
This is Rietveld 408576698