From b53694a93e6271f44ca43f76e0b2838b6854495c Mon Sep 17 00:00:00 2001 From: "pavlov%pavlov.net" Date: Mon, 11 Jan 1999 23:06:13 +0000 Subject: [PATCH] set event.point.[xy] to 0 git-svn-id: svn://10.0.0.236/trunk@17520 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/widget/src/gtk/nsGtkEventHandler.cpp | 24 +++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/mozilla/widget/src/gtk/nsGtkEventHandler.cpp b/mozilla/widget/src/gtk/nsGtkEventHandler.cpp index 7694ff6804c..2f436485953 100644 --- a/mozilla/widget/src/gtk/nsGtkEventHandler.cpp +++ b/mozilla/widget/src/gtk/nsGtkEventHandler.cpp @@ -296,6 +296,8 @@ void InitKeyEvent(GdkEventKey *aGEK, anEvent.isControl = (aGEK->state & GDK_CONTROL_MASK) ? PR_TRUE : PR_FALSE; anEvent.isAlt = (aGEK->state & GDK_MOD1_MASK) ? PR_TRUE : PR_FALSE; anEvent.time = aGEK->time; + anEvent.point.x = 0; + anEvent.point.y = 0; } } @@ -304,6 +306,17 @@ void InitKeyEvent(GdkEventKey *aGEK, ============================================================= ==============================================================*/ +static gboolean reset_resize_handler (gpointer data) +{ + nsWindow *win = (nsWindow *)data; + GtkWidget *w = GTK_WIDGET(win->GetNativeData(NS_NATIVE_WIDGET)); + gtk_signal_connect_after(GTK_OBJECT(w), + "size_allocate", + GTK_SIGNAL_FUNC(handle_size_allocate), + win); + return FALSE; +} + void handle_size_allocate(GtkWidget *w, GtkAllocation *alloc, gpointer p) { g_print("size_allocate: %p, {x=%i, y=%i, w=%i, h=%i}\n", w, alloc->x, @@ -313,6 +326,7 @@ void handle_size_allocate(GtkWidget *w, GtkAllocation *alloc, gpointer p) nsSizeEvent sevent; InitAllocationEvent(alloc, p, sevent, NS_SIZE); + sevent.mWinWidth = alloc->width; sevent.mWinHeight = alloc->height; /* sevent.mWinWidth = gtk_widget_get_toplevel(w)->allocation.width; @@ -320,8 +334,16 @@ void handle_size_allocate(GtkWidget *w, GtkAllocation *alloc, gpointer p) */ nsWindow *win = (nsWindow *)p; - win->OnResize(sevent); + + + /* block the signal for a few nanosecs */ +/* + gtk_signal_disconnect_by_func(GTK_OBJECT(w), + GTK_SIGNAL_FUNC(handle_size_allocate), + win); + gtk_timeout_add (10, reset_resize_handler, win); +*/ } gint handle_configure_event(GtkWidget *w, GdkEventConfigure *conf, gpointer p)