]> git.xonotic.org Git - xonotic/netradiant.git/commitdiff
macos: disable drawing xorrectangle (rectangle selection feedback)
authorThomas Debesse <dev@illwieckz.net>
Tue, 22 Dec 2020 19:08:31 +0000 (20:08 +0100)
committerThomas Debesse <dev@illwieckz.net>
Tue, 22 Dec 2020 22:53:06 +0000 (23:53 +0100)
disable drawing xorrectangle (rectangle selection feedback)
to workaround crash, selection still works

libs/gtkutil/xorrectangle.cpp

index ab15ac88a730b3fa581e4f835a6141fd2c454cd6..56ae908a2e911c3ab7e65b6220d18dc6eed2e684 100644 (file)
@@ -16,6 +16,7 @@ void XORRectangle::lazy_init()
 
 void XORRectangle::draw() const
 {
+#ifndef WORKAROUND_MACOS_GTK2_DESTROY
     const int x = float_to_integer(m_rectangle.x);
     const int y = float_to_integer(m_rectangle.y);
     const int w = float_to_integer(m_rectangle.w);
@@ -26,6 +27,7 @@ void XORRectangle::draw() const
     cairo_set_source_rgb(cr, 1, 1, 1);
     cairo_set_operator(cr, CAIRO_OPERATOR_DIFFERENCE);
     cairo_stroke(cr);
+#endif
 }
 
 XORRectangle::XORRectangle(ui::GLArea widget) : m_widget(widget), cr(0)