New idle handling. Only that.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2295 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -19,6 +19,13 @@
|
||||
#include "gdk/gdk.h"
|
||||
#include "gtk/gtk.h"
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// idle system
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
extern void wxapp_install_idle_handler();
|
||||
extern bool g_isIdle;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// data
|
||||
//-----------------------------------------------------------------------------
|
||||
@@ -32,6 +39,8 @@ extern bool g_blockEventsOnScroll;
|
||||
|
||||
static void gtk_scrollbar_callback( GtkWidget *WXUNUSED(widget), wxScrollBar *win )
|
||||
{
|
||||
if (g_isIdle) wxapp_install_idle_handler();
|
||||
|
||||
if (!win->HasVMT()) return;
|
||||
if (g_blockEventsOnDrag) return;
|
||||
|
||||
@@ -83,10 +92,12 @@ static gint gtk_scrollbar_button_press_callback( GtkRange *WXUNUSED(widget),
|
||||
GdkEventButton *WXUNUSED(gdk_event),
|
||||
wxScrollBar *win )
|
||||
{
|
||||
win->m_isScrolling = TRUE;
|
||||
if (g_isIdle) wxapp_install_idle_handler();
|
||||
|
||||
win->m_isScrolling = TRUE;
|
||||
// g_blockEventsOnScroll = TRUE; doesn't work in DialogEd
|
||||
|
||||
return FALSE;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
@@ -97,6 +108,8 @@ static gint gtk_scrollbar_button_release_callback( GtkRange *WXUNUSED(widget),
|
||||
GdkEventButton *WXUNUSED(gdk_event),
|
||||
wxScrollBar *win )
|
||||
{
|
||||
if (g_isIdle) wxapp_install_idle_handler();
|
||||
|
||||
win->m_isScrolling = FALSE;
|
||||
// g_blockEventsOnScroll = FALSE;
|
||||
|
||||
|
Reference in New Issue
Block a user