From d301e5c546a7dea0de8fde5b07a2a57afd02103b Mon Sep 17 00:00:00 2001 From: Kalyan Kondapally Date: Wed, 27 Aug 2014 21:47:09 -0700 Subject: [PATCH] Make IsMinimized as read only. --- wayland/shell/shell_surface.h | 2 +- wayland/shell/wl_shell_surface.cc | 2 +- wayland/shell/wl_shell_surface.h | 2 +- wayland/shell/xdg_shell_surface.cc | 4 ++++ wayland/shell/xdg_shell_surface.h | 2 +- 5 files changed, 8 insertions(+), 4 deletions(-) diff --git a/wayland/shell/shell_surface.h b/wayland/shell/shell_surface.h index 9a0920d3..35251af6 100644 --- a/wayland/shell/shell_surface.h +++ b/wayland/shell/shell_surface.h @@ -32,7 +32,7 @@ class WaylandShellSurface { virtual void Maximize() = 0; virtual void Minimize() = 0; virtual void Unminimize() = 0; - virtual bool IsMinimized() = 0; + virtual bool IsMinimized() const = 0; // static functions. static void PopupDone(); diff --git a/wayland/shell/wl_shell_surface.cc b/wayland/shell/wl_shell_surface.cc index e35e8c7d..6206ac36 100644 --- a/wayland/shell/wl_shell_surface.cc +++ b/wayland/shell/wl_shell_surface.cc @@ -97,7 +97,7 @@ void WLShellSurface::Minimize() { void WLShellSurface::Unminimize() { } -bool WLShellSurface::IsMinimized() { +bool WLShellSurface::IsMinimized() const { return false; } diff --git a/wayland/shell/wl_shell_surface.h b/wayland/shell/wl_shell_surface.h index 6dbaa3bf..4b09b9e7 100644 --- a/wayland/shell/wl_shell_surface.h +++ b/wayland/shell/wl_shell_surface.h @@ -26,7 +26,7 @@ class WLShellSurface : public WaylandShellSurface { virtual void Maximize() OVERRIDE; virtual void Minimize() OVERRIDE; virtual void Unminimize() OVERRIDE; - virtual bool IsMinimized() OVERRIDE; + virtual bool IsMinimized() const OVERRIDE; static void HandleConfigure(void* data, struct wl_shell_surface* shell_surface, diff --git a/wayland/shell/xdg_shell_surface.cc b/wayland/shell/xdg_shell_surface.cc index 86800773..57b4d0a5 100644 --- a/wayland/shell/xdg_shell_surface.cc +++ b/wayland/shell/xdg_shell_surface.cc @@ -126,6 +126,10 @@ void XDGShellSurface::Unminimize() { minimized_ = false; } +bool XDGShellSurface::IsMinimized() const { + return minimized_; +} + void XDGShellSurface::HandleConfigure(void* data, struct xdg_surface* xdg_surface, int32_t width, diff --git a/wayland/shell/xdg_shell_surface.h b/wayland/shell/xdg_shell_surface.h index e7e1bc37..a2fb0c44 100644 --- a/wayland/shell/xdg_shell_surface.h +++ b/wayland/shell/xdg_shell_surface.h @@ -29,7 +29,7 @@ class XDGShellSurface : public WaylandShellSurface { virtual void Maximize() OVERRIDE; virtual void Minimize() OVERRIDE; virtual void Unminimize() OVERRIDE; - virtual bool IsMinimized() OVERRIDE {return minimized_;}; + virtual bool IsMinimized() const OVERRIDE; static void HandleConfigure(void* data, struct xdg_surface* xdg_surface,