Re: [gtk-osx-users] crash on updateTrackingRect is BAAACK



On Tue, 17 Nov 2020, John Ralls wrote:

On Nov 17, 2020, at 12:53 PM, Allin Cottrell <cottrell wfu edu> wrote:

I just tested full-screening and red button closing GnuCash built yesterday with Gtk+-3.24.23 on macOS 11 and run with MallocScribble=1 to make sure that a use-after-free would crash. It closed cleanly, no crash. You might diff GtkNSWindow.c between Gtk2 and Gtk3 to see if there's something helpful there.

GtkNSWindow.c ? I'm not seeing a file of that name (or close) in the GTK 2 codebase.

Sorry, gdk/quartz/GdkQuartzWindow.c.

Thanks, I see now: it's GdkQuartzWindow.c in Gtk2 and GdkQuartzNSWindow.c in Gtk3. Looks like there are several updates for recent macOS in the latter, and backporting such changes to Gtk2 might be useful for retrogrades such as myself.

One question. There's a trope that appears in several places in the Gtk2 version:

  GdkWindow *window = [[self contentView] gdkWindow];
  GdkWindowObject *private = (GdkWindowObject *)window;
  GdkWindowImplQuartz *impl = GDK_WINDOW_IMPL_QUARTZ (private->impl);

while in the Gtk3 version, in the corresponding places, we find:

  GdkWindow *window = [[self contentView] gdkWindow];
  GdkWindowImplQuartz *impl = GDK_WINDOW_IMPL_QUARTZ (window->impl);

Is this difference cosmetic, or is the intervening cast from *gdkWindow to *GdkWindowObject really required in the Gtk2 case?

--
Allin Cottrell
Department of Economics
Wake Forest University


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]