[aseprite] 163/250: Fix window resize on Skia/OSX

Tobias Hansen thansen at moszumanska.debian.org
Sun Dec 20 15:27:24 UTC 2015


This is an automated email from the git hooks/post-receive script.

thansen pushed a commit to branch master
in repository aseprite.

commit 47f493df78b2661c6429eb0bfe8e958f440a02c5
Author: David Capello <davidcapello at gmail.com>
Date:   Tue Oct 13 18:49:56 2015 -0300

    Fix window resize on Skia/OSX
---
 src/she/osx/window.h  | 2 --
 src/she/osx/window.mm | 8 +++-----
 2 files changed, 3 insertions(+), 7 deletions(-)

diff --git a/src/she/osx/window.h b/src/she/osx/window.h
index 859313f..9eed80c 100644
--- a/src/she/osx/window.h
+++ b/src/she/osx/window.h
@@ -34,8 +34,6 @@ public:
   OSXWindowImpl* m_impl;
   OSXWindowDelegate* m_delegate;
   int m_scale;
-  gfx::Size m_clientSize;
-  gfx::Size m_restoredSize;
 }
 - (OSXWindow*)initWithImpl:(OSXWindowImpl*)impl;
 - (OSXWindowImpl*)impl;
diff --git a/src/she/osx/window.mm b/src/she/osx/window.mm
index a9eb595..3a3f1bb 100644
--- a/src/she/osx/window.mm
+++ b/src/she/osx/window.mm
@@ -23,9 +23,6 @@
   m_scale = 1;
 
   NSRect rect = NSMakeRect(0, 0, 640, 480);
-  m_clientSize.w = m_restoredSize.w = rect.size.width;
-  m_clientSize.h = m_restoredSize.h = rect.size.height;
-
   self = [self initWithContentRect:rect
                          styleMask:(NSTitledWindowMask | NSClosableWindowMask |
                                     NSMiniaturizableWindowMask | NSResizableWindowMask)
@@ -68,12 +65,13 @@
 
 - (gfx::Size)clientSize
 {
-  return m_clientSize;
+  return gfx::Size([[self contentView] frame].size.width,
+                   [[self contentView] frame].size.height);
 }
 
 - (gfx::Size)restoredSize
 {
-  return m_restoredSize;
+  return [self clientSize];
 }
 
 @end

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/aseprite.git



More information about the Pkg-games-commits mailing list