2

The following is about gtk2 with the Quartz backend on Mac. If I have a gtk.Window (or a gdk.Window), how do I get the underlying NSWindow (preferably as a pyobjc object, or if that's not possible, just a pointer)?

(I'm trying to get [window windowNumber], which is needed to enable blur-behind transparent windows.)

jdm
  • 9,470
  • 12
  • 58
  • 110
  • Since you accepted houbysoft's answer I was wondering if you managed it to call `gdk_quartz_window_get_nswindow()`? I always get a Segfault, see here: http://stackoverflow.com/questions/35669176/get-the-window-handle-in-pygi-on-macos – Biggie Feb 27 '16 at 11:37

1 Answers1

2

Not sure about the exact name of the function in pygtk, but I believe that in C you can call gdk_quartz_window_get_nswindow().

houbysoft
  • 32,532
  • 24
  • 103
  • 156