break;
}
- surface_factory->AttemptToResizeAcceleratedWidget(window_, bounds_);
CreateCompositor(GetAcceleratedWidget());
}
-bool DesktopWindowTreeHostWayland::IsWindowManagerPresent() {
- return true;
-}
-
////////////////////////////////////////////////////////////////////////////////
// DesktopWindowTreeHostWayland, DesktopWindowTreeHost implementation:
}
Show();
+ if (show_state == ui::SHOW_STATE_MAXIMIZED)
+ Maximize();
// Set initial focus for root window.
if (!window_parent_)
native_widget_delegate_->AsWidget()->SetInitialFocus(show_state);
void DesktopWindowTreeHostWayland::GetWindowPlacement(
gfx::Rect* bounds,
ui::WindowShowState* show_state) const {
- *bounds = bounds_;
+ *bounds = GetRestoredBounds();
if (IsFullscreen()) {
*show_state = ui::SHOW_STATE_FULLSCREEN;
////////////////////////////////////////////////////////////////////////////////
// DesktopWindowTreeHostWayland, aura::WindowTreeHost implementation:
+ui::EventSource* DesktopWindowTreeHostWayland::GetEventSource() {
+ NOTIMPLEMENTED();
+ return NULL;
+}
+
gfx::AcceleratedWidget DesktopWindowTreeHostWayland::GetAcceleratedWidget() {
return window_;
}
state_ |= Visible;
ui::WindowStateChangeHandler::GetInstance()->SetWidgetState(window_,
ui::SHOW);
+ native_widget_delegate_->OnNativeWidgetVisibilityChanged(true);
}
void DesktopWindowTreeHostWayland::Hide() {
state_ &= ~Visible;
ui::WindowStateChangeHandler::GetInstance()->SetWidgetState(window_,
ui::HIDE);
-}
-
-void DesktopWindowTreeHostWayland::ToggleFullScreen() {
- SetFullscreen(!(state_ & FullScreen));
+ native_widget_delegate_->OnNativeWidgetVisibilityChanged(false);
}
gfx::Rect DesktopWindowTreeHostWayland::GetBounds() const {
if (origin_changed)
native_widget_delegate_->AsWidget()->OnNativeWidgetMove();
- if (size_changed) {
- ui::WindowStateChangeHandler::GetInstance()->SetWidgetState(
- window_, ui::RESIZE, bounds.width(), bounds.height());
+ if (size_changed)
OnHostResized(bounds.size());
- } else {
+ else
compositor()->ScheduleRedrawRect(bounds);
- }
-}
-
-gfx::Insets DesktopWindowTreeHostWayland::GetInsets() const {
- return gfx::Insets();
-}
-
-void DesktopWindowTreeHostWayland::SetInsets(const gfx::Insets& insets) {
}
gfx::Point DesktopWindowTreeHostWayland::GetLocationOnNativeScreen() const {
cursor.native_type());
}
-bool DesktopWindowTreeHostWayland::QueryMouseLocation(
- gfx::Point* location_return) {
- NOTIMPLEMENTED();
- return false;
-}
-
-bool DesktopWindowTreeHostWayland::ConfineCursorToRootWindow() {
- NOTIMPLEMENTED();
- return false;
-}
-
-void DesktopWindowTreeHostWayland::UnConfineCursor() {
- NOTIMPLEMENTED();
-}
-
void DesktopWindowTreeHostWayland::OnCursorVisibilityChangedNative(bool show) {
// TODO(erg): Conditional on us enabling touch on desktop linux builds, do
// the same tap-to-click disabling here that chromeos does.
} else {
bounds_ = gfx::Rect(bounds_.x(), bounds_.y(), width, height);
OnHostResized(bounds_.size());
- ui::WindowStateChangeHandler::GetInstance()->SetWidgetState(
- window_, ui::RESIZE, bounds_.width(), bounds_.height());
Widget* widget = native_widget_delegate_->AsWidget();
NonClientView* non_client_view = widget->non_client_view();
// non_client_view may be NULL, especially during creation.
DesktopWindowTreeHost::GetNativeTheme(aura::Window* window) {
const views::LinuxUI* linux_ui = views::LinuxUI::instance();
if (linux_ui) {
- ui::NativeTheme* native_theme = linux_ui->GetNativeTheme();
+ ui::NativeTheme* native_theme = linux_ui->GetNativeTheme(window);
if (native_theme)
return native_theme;
}