Re: [Pyobjc-dev] different behaviour for NSView.drawRect_
Brought to you by:
ronaldoussoren
From: Ronald O. <ron...@ma...> - 2019-01-02 13:59:32
|
— Twitter: @ronaldoussoren Blog: https://blog.ronaldoussoren.net/ > On 2 Jan 2019, at 12:39, Frederik Berlaen <fre...@ty...> wrote: > > Hi! > > I noticed different behaviour of macOS calling my nsView subclass drawRect_ method, when I run a script directly in terminal or from within my app: DrawBot (http://www.drawbot.com <http://www.drawbot.com/>) > > The python version and installed packages are the same, the most current ones from pip. > > The window is build with vanilla (a pythonic cocoa wrapper) https://github.com/typesupply/vanilla <https://github.com/typesupply/vanilla> > > <viewIssue.py> > > When this script is executed inside DrawBot: I get, based on my screen (retina or an old cinema HD), lots of drawRect_ callback with fixed width and height. > > When executed in no-app world, terminal: I get a single callback on my drawRect_ with the size of the visible rect. > > I fully understand the difference in performance and why this is happening. > > > BUT: > > Im unable to toggle between those two settings. I don't know what or where I have to change a setting to get a specific behaviour: > * tilled drawRect_ callbacks > * a visible rect drawRect callback > > > > please point me in the right direction > > (If this question is posted in the wrong place, I happily repost it elsewhere) This could be related to the SDK the main binary is linked to (the application stub from py2app vs. the python executable). P.S. This is just a quick reply, I haven’t tried to verify my hunch. Ronald |