Checkpointing Changes. Not part of the build. Call Resize() after the widgets are created to make sure they are all the right size when they are shown. Make sure to flush the window draw queue after scrolling to get an immidiate repaint.
git-svn-id: svn://10.0.0.236/trunk@110368 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -41,7 +41,8 @@ static void moz_drawingarea_init (MozDrawingarea *drawingarea);
|
||||
|
||||
/* static methods */
|
||||
static void moz_drawingarea_create_windows (MozDrawingarea *drawingarea,
|
||||
GdkWindow *parent, GtkWidget *widget);
|
||||
GdkWindow *parent,
|
||||
GtkWidget *widget);
|
||||
|
||||
static GObjectClass *parent_class = NULL;
|
||||
|
||||
@@ -192,6 +193,5 @@ void
|
||||
moz_drawingarea_scroll (MozDrawingarea *drawingarea,
|
||||
gint x, gint y)
|
||||
{
|
||||
gdk_window_scroll(drawingarea->inner_window,
|
||||
x, y);
|
||||
gdk_window_scroll(drawingarea->inner_window, x, y);
|
||||
}
|
||||
|
||||
@@ -44,9 +44,11 @@
|
||||
#include <gdk/gdkx.h>
|
||||
#include <gdk/gdkkeysyms.h>
|
||||
|
||||
/* utility functions */
|
||||
static nsWindow *get_window_for_gtk_widget(GtkWidget *widget);
|
||||
static nsWindow *get_window_for_gdk_window(GdkWindow *window);
|
||||
|
||||
/* callbacks from widgets */
|
||||
static gboolean expose_event_cb (GtkWidget *widget,
|
||||
GdkEventExpose *event);
|
||||
static gboolean configure_event_cb (GtkWidget *widget,
|
||||
@@ -472,7 +474,9 @@ nsWindow::Scroll(PRInt32 aDx,
|
||||
PRInt32 aDy,
|
||||
nsRect *aClipRect)
|
||||
{
|
||||
// XXX fix this so that it doesn't expose twice!
|
||||
moz_drawingarea_scroll(mDrawingarea, aDx, aDy);
|
||||
gdk_window_process_all_updates();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
@@ -1216,6 +1220,9 @@ nsWindow::NativeCreate(nsIWidget *aParent,
|
||||
GDK_WINDOW_XWINDOW(mDrawingarea->clip_window),
|
||||
GDK_WINDOW_XWINDOW(mDrawingarea->inner_window));
|
||||
|
||||
// resize so that everything is set to the right dimensions
|
||||
Resize(mBounds.width, mBounds.height, PR_FALSE);
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user