Projects
Eulaceura:Factory
wxPython
_service:obs_scm:wxPython-3.0.2.0-getxwindowcra...
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File _service:obs_scm:wxPython-3.0.2.0-getxwindowcrash.patch of Package wxPython
diff -up wxPython-src-3.0.2.0/wxPython/src/helpers.cpp.getxwindowcrash wxPython-src-3.0.2.0/wxPython/src/helpers.cpp --- wxPython-src-3.0.2.0/wxPython/src/helpers.cpp.getxwindowcrash 2014-10-13 18:37:52.000000000 -0400 +++ wxPython-src-3.0.2.0/wxPython/src/helpers.cpp 2015-01-03 22:05:35.936010783 -0500 @@ -29,9 +29,19 @@ #include <gtk/gtk.h> #include <gdk/gdkx.h> #ifdef __WXGTK3__ -#define GetXWindow(wxwin) (wxwin)->m_wxwindow ? \ - GDK_WINDOW_XID(gtk_widget_get_window((wxwin)->m_wxwindow)) : \ - GDK_WINDOW_XID(gtk_widget_get_window((wxwin)->m_widget)) +// Unlike GDK_WINDOW_XWINDOW, GDK_WINDOW_XID can't handle a NULL, so check 1st +static XID GetXWindow(wxWindow* wxwin) { + if ((wxwin)->m_wxwindow) { + if (gtk_widget_get_window((wxwin)->m_wxwindow)) + return GDK_WINDOW_XID(gtk_widget_get_window((wxwin)->m_wxwindow)); + return 0; + } + else { + if (gtk_widget_get_window((wxwin)->m_widget)) + return GDK_WINDOW_XID(gtk_widget_get_window((wxwin)->m_widget)); + return 0; + } +} #else #define GetXWindow(wxwin) (wxwin)->m_wxwindow ? \ GDK_WINDOW_XWINDOW((wxwin)->m_wxwindow->window) : \
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.
浙ICP备2022010568号-2