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

Issue 8374005: aura: Try to make Linux host resize code more reliable. (Closed)

Created:
9 years, 2 months ago by Daniel Erat
Modified:
9 years, 2 months ago
Reviewers:
sadrul, oshima
CC:
chromium-reviews, Paweł Hajdan Jr.
Visibility:
Public.

Description

aura: Try to make Linux host resize code more reliable. There's no guarantee that we'll get the host window size that we ask for. This adjusts WindowTest.Transform to not ask for a specific size, and instead just use the size it's been given. I also fixed a race in DesktopHostLinux::Show() when running under X window managers that don't take the _WM_S0 selection. We now wait for notification that the host window has been mapped before trying to focus it. I moved the logic for choosing to create a fullscreen host window out of DesktopHostLinux and into the browser. Finally, I changed DesktopHostLinux::SetSize() (called by Desktop::SetHostSize()) update the internal size and notify the desktop immediately. BUG=100979, 100894 TEST=tests pass on ion3; fullscreen window is created on chrome os Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=106989

Patch Set 1 #

Patch Set 2 : comments #

Patch Set 3 : minor cleanup #

Total comments: 1

Patch Set 4 : fix some races #

Patch Set 5 : use ToString in test comparisons #

Patch Set 6 : reset host win position when wm isn't running #

Total comments: 9

Patch Set 7 : apply feedback #

Patch Set 8 : re-add size check #

Total comments: 3

Patch Set 9 : re-add call to XResizeWindow() #

Total comments: 2

Patch Set 10 : simplify gfx::Rect() calls in test #

Patch Set 11 : update a few other gfx::Rect calls #

Unified diffs Side-by-side diffs Delta from patch set Stats (+119 lines, -87 lines) Patch
M chrome/browser/chrome_browser_main.cc View 1 2 3 4 5 6 2 chunks +6 lines, -0 lines 0 comments Download
M ui/aura/desktop.h View 1 2 3 4 5 6 2 chunks +12 lines, -3 lines 0 comments Download
M ui/aura/desktop.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +14 lines, -13 lines 0 comments Download
M ui/aura/desktop_host.h View 1 2 3 4 5 6 1 chunk +4 lines, -0 lines 0 comments Download
M ui/aura/desktop_host_linux.cc View 1 2 3 4 5 6 7 8 8 chunks +60 lines, -60 lines 0 comments Download
M ui/aura/desktop_host_win.cc View 1 2 3 4 5 6 1 chunk +6 lines, -0 lines 0 comments Download
M ui/aura/window_unittest.cc View 1 2 3 4 5 6 7 8 9 2 chunks +17 lines, -11 lines 0 comments Download

Messages

Total messages: 14 (0 generated)
Daniel Erat
I need to be OOO for 2-3 hours but can check this in after that ...
9 years, 2 months ago (2011-10-21 19:15:23 UTC) #1
sadrul
This LGTM. aura_unittests is currently green, so landing this after 2-3 hrs sounds OK to ...
9 years, 2 months ago (2011-10-21 19:19:55 UTC) #2
Daniel Erat
Actually, this change is broken -- it drops ConfigureNotify events. :-P I'll fix it soon. ...
9 years, 2 months ago (2011-10-21 19:49:40 UTC) #3
oshima
http://codereview.chromium.org/8374005/diff/4001/ui/aura/window_unittest.cc File ui/aura/window_unittest.cc (right): http://codereview.chromium.org/8374005/diff/4001/ui/aura/window_unittest.cc#newcode966 ui/aura/window_unittest.cc:966: gfx::Screen::GetMonitorAreaNearestPoint(gfx::Point())); Just a suggestion. I've been using string to ...
9 years, 2 months ago (2011-10-21 19:55:45 UTC) #4
Daniel Erat
Another look? I noticed some more problems. http://codereview.chromium.org/8374005/diff/2005/ui/aura/desktop_host_linux.cc File ui/aura/desktop_host_linux.cc (right): http://codereview.chromium.org/8374005/diff/2005/ui/aura/desktop_host_linux.cc#newcode219 ui/aura/desktop_host_linux.cc:219: gfx::Size size_; ...
9 years, 2 months ago (2011-10-21 23:00:36 UTC) #5
sadrul
http://codereview.chromium.org/8374005/diff/2005/ui/aura/desktop.h File ui/aura/desktop.h (right): http://codereview.chromium.org/8374005/diff/2005/ui/aura/desktop.h#newcode74 ui/aura/desktop.h:74: // may not be immediately reflected in GetHostSize(). I ...
9 years, 2 months ago (2011-10-22 18:53:04 UTC) #6
Daniel Erat
http://codereview.chromium.org/8374005/diff/2005/ui/aura/desktop.h File ui/aura/desktop.h (right): http://codereview.chromium.org/8374005/diff/2005/ui/aura/desktop.h#newcode74 ui/aura/desktop.h:74: // may not be immediately reflected in GetHostSize(). On ...
9 years, 2 months ago (2011-10-23 04:02:55 UTC) #7
sadrul
http://codereview.chromium.org/8374005/diff/2005/ui/aura/desktop_host_linux.cc File ui/aura/desktop_host_linux.cc (right): http://codereview.chromium.org/8374005/diff/2005/ui/aura/desktop_host_linux.cc#newcode238 ui/aura/desktop_host_linux.cc:238: 0, 0, DisplayWidth(xdisplay_, 0), DisplayHeight(xdisplay_, 0)); On 2011/10/23 04:02:55, ...
9 years, 2 months ago (2011-10-23 20:45:02 UTC) #8
Daniel Erat
Another look? http://codereview.chromium.org/8374005/diff/11001/ui/aura/desktop_host_linux.cc File ui/aura/desktop_host_linux.cc (left): http://codereview.chromium.org/8374005/diff/11001/ui/aura/desktop_host_linux.cc#oldcode285 ui/aura/desktop_host_linux.cc:285: case MotionNotify: { I'm just moving this ...
9 years, 2 months ago (2011-10-24 17:40:39 UTC) #9
oshima
http://codereview.chromium.org/8374005/diff/11001/ui/aura/desktop_host_linux.cc File ui/aura/desktop_host_linux.cc (right): http://codereview.chromium.org/8374005/diff/11001/ui/aura/desktop_host_linux.cc#newcode397 ui/aura/desktop_host_linux.cc:397: desktop_->OnHostResized(size); Sorry if I'm missing something. Don't we still ...
9 years, 2 months ago (2011-10-24 20:29:22 UTC) #10
Daniel Erat
http://codereview.chromium.org/8374005/diff/11001/ui/aura/desktop_host_linux.cc File ui/aura/desktop_host_linux.cc (right): http://codereview.chromium.org/8374005/diff/11001/ui/aura/desktop_host_linux.cc#newcode397 ui/aura/desktop_host_linux.cc:397: desktop_->OnHostResized(size); On 2011/10/24 20:29:22, oshima wrote: > Sorry if ...
9 years, 2 months ago (2011-10-24 20:33:28 UTC) #11
sadrul
LGTM http://codereview.chromium.org/8374005/diff/6004/ui/aura/window_unittest.cc File ui/aura/window_unittest.cc (right): http://codereview.chromium.org/8374005/diff/6004/ui/aura/window_unittest.cc#newcode986 ui/aura/window_unittest.cc:986: EXPECT_EQ(gfx::Rect(gfx::Point(), transformed_size).ToString(), I think just 'gfx::Rect(transformed_size)' will work
9 years, 2 months ago (2011-10-24 20:40:24 UTC) #12
Daniel Erat
http://codereview.chromium.org/8374005/diff/6004/ui/aura/window_unittest.cc File ui/aura/window_unittest.cc (right): http://codereview.chromium.org/8374005/diff/6004/ui/aura/window_unittest.cc#newcode986 ui/aura/window_unittest.cc:986: EXPECT_EQ(gfx::Rect(gfx::Point(), transformed_size).ToString(), On 2011/10/24 20:40:24, sadrul wrote: > I ...
9 years, 2 months ago (2011-10-24 20:45:40 UTC) #13
oshima
9 years, 2 months ago (2011-10-24 20:52:41 UTC) #14
LGTM

On Mon, Oct 24, 2011 at 1:45 PM, <derat@chromium.org> wrote:

>
> http://codereview.chromium.**org/8374005/diff/6004/ui/aura/**
>
window_unittest.cc<http://codereview.chromium.org/8374005/diff/6004/ui/aura/window_unittest.cc>
> File ui/aura/window_unittest.cc (right):
>
> http://codereview.chromium.**org/8374005/diff/6004/ui/aura/**
>
window_unittest.cc#newcode986<http://codereview.chromium.org/8374005/diff/6004/ui/aura/window_unittest.cc#newcode986>
> ui/aura/window_unittest.cc:**986: EXPECT_EQ(gfx::Rect(gfx::**Point(),
> transformed_size).ToString(),
> On 2011/10/24 20:40:24, sadrul wrote:
>
>> I think just 'gfx::Rect(transformed_size)' will work
>>
>
> Good point.  Done.
>
>
http://codereview.chromium.**org/8374005/<http://codereview.chromium.org/8374...
>

Powered by Google App Engine
This is Rietveld 408576698