bug13815.patch 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. commit 2ee38d1881aeea27bb49acc450631d813d1f28ba
  2. Author: Hubert Figuière <hub@figuiere.net>
  3. Date: Wed Dec 7 09:44:01 2016 -0500
  4. Bug 13815 - draw event should return TRUE
  5. This fix the black drawing regression witj Gtk3.22
  6. diff --git a/src/af/xap/gtk/xap_UnixFrameImpl.cpp b/src/af/xap/gtk/xap_UnixFrameImpl.cpp
  7. index 780000e..10f8e00 100644
  8. --- a/src/af/xap/gtk/xap_UnixFrameImpl.cpp
  9. +++ b/src/af/xap/gtk/xap_UnixFrameImpl.cpp
  10. @@ -1208,9 +1208,9 @@ gint XAP_UnixFrameImpl::_fe::delete_event(GtkWidget * w, GdkEvent * /*event*/, g
  11. }
  12. #if GTK_CHECK_VERSION(3,0,0)
  13. -gint XAP_UnixFrameImpl::_fe::draw(GtkWidget * w, cairo_t * cr)
  14. +gboolean XAP_UnixFrameImpl::_fe::draw(GtkWidget * w, cairo_t * cr)
  15. #else
  16. -gint XAP_UnixFrameImpl::_fe::expose(GtkWidget * w, GdkEventExpose* pExposeEvent)
  17. +gboolean XAP_UnixFrameImpl::_fe::expose(GtkWidget * w, GdkEventExpose* pExposeEvent)
  18. #endif
  19. {
  20. XAP_UnixFrameImpl * pUnixFrameImpl = static_cast<XAP_UnixFrameImpl *>(g_object_get_data(G_OBJECT(w), "user_data"));
  21. @@ -1243,7 +1243,7 @@ gint XAP_UnixFrameImpl::_fe::expose(GtkWidget * w, GdkEventExpose* pExposeEvent)
  22. pView->draw(&rClip);
  23. #endif
  24. }
  25. - return FALSE;
  26. + return TRUE;
  27. }
  28. static bool bScrollWait = false;
  29. diff --git a/src/af/xap/gtk/xap_UnixFrameImpl.h b/src/af/xap/gtk/xap_UnixFrameImpl.h
  30. index 30ee5d8..a0ff57f 100644
  31. --- a/src/af/xap/gtk/xap_UnixFrameImpl.h
  32. +++ b/src/af/xap/gtk/xap_UnixFrameImpl.h
  33. @@ -152,9 +152,9 @@ protected:
  34. static gint key_release_event(GtkWidget* w, GdkEventKey* e);
  35. static gint delete_event(GtkWidget * w, GdkEvent * /*event*/, gpointer /*data*/);
  36. #if GTK_CHECK_VERSION(3,0,0)
  37. - static gint draw(GtkWidget * w, cairo_t * cr);
  38. + static gboolean draw(GtkWidget * w, cairo_t * cr);
  39. #else
  40. - static gint expose(GtkWidget * w, GdkEventExpose* pExposeEvent);
  41. + static gboolean expose(GtkWidget * w, GdkEventExpose* pExposeEvent);
  42. #endif
  43. static gint do_ZoomUpdate( gpointer /* xap_UnixFrame * */ p);
  44. static void vScrollChanged(GtkAdjustment * w, gpointer /*data*/);