Undid the bin-incompatible change to wxSize.
Corrected the Mask() creation on 16-bit visuals. Applied the cool patch for gtk_pizza() to reduce unnecessarry paint events. Added bzip-dist to create better compressed archives. Added files.lst to source distribution. Bumped version to 2.2.1. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7737 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
31
Makefile.in
31
Makefile.in
@@ -130,12 +130,19 @@ INTLDIR = $(WXDIR)/locale
|
||||
|
||||
########################## Archive name ###############################
|
||||
|
||||
WXARCHIVE = @DISTDIR@-$(WX_MAJOR_VERSION_NUMBER).$(WX_MINOR_VERSION_NUMBER).$(WX_RELEASE_NUMBER).tgz
|
||||
WXGLARCHIVE = @DISTDIR@-gl-$(WX_MAJOR_VERSION_NUMBER).$(WX_MINOR_VERSION_NUMBER).$(WX_RELEASE_NUMBER).tgz
|
||||
WXSAMPLES = wx$(TOOLKIT)-samples-$(WX_MAJOR_VERSION_NUMBER).$(WX_MINOR_VERSION_NUMBER).$(WX_RELEASE_NUMBER).tgz
|
||||
WXDEMOS = wx$(TOOLKIT)-demos-$(WX_MAJOR_VERSION_NUMBER).$(WX_MINOR_VERSION_NUMBER).$(WX_RELEASE_NUMBER).tgz
|
||||
WXARCHIVE = @DISTDIR@-$(WX_MAJOR_VERSION_NUMBER).$(WX_MINOR_VERSION_NUMBER).$(WX_RELEASE_NUMBER).tar.gz
|
||||
WXGLARCHIVE = @DISTDIR@-gl-$(WX_MAJOR_VERSION_NUMBER).$(WX_MINOR_VERSION_NUMBER).$(WX_RELEASE_NUMBER).tar.gz
|
||||
WXSAMPLES = wx$(TOOLKIT)-samples-$(WX_MAJOR_VERSION_NUMBER).$(WX_MINOR_VERSION_NUMBER).$(WX_RELEASE_NUMBER).tar.gz
|
||||
WXDEMOS = wx$(TOOLKIT)-demos-$(WX_MAJOR_VERSION_NUMBER).$(WX_MINOR_VERSION_NUMBER).$(WX_RELEASE_NUMBER).tar.gz
|
||||
|
||||
WXARCHIVE_BZIP = @DISTDIR@-$(WX_MAJOR_VERSION_NUMBER).$(WX_MINOR_VERSION_NUMBER).$(WX_RELEASE_NUMBER).tar.bz2
|
||||
WXGLARCHIVE_BZIP = @DISTDIR@-gl-$(WX_MAJOR_VERSION_NUMBER).$(WX_MINOR_VERSION_NUMBER).$(WX_RELEASE_NUMBER).tar.bz2
|
||||
WXSAMPLES_BZIP = wx$(TOOLKIT)-samples-$(WX_MAJOR_VERSION_NUMBER).$(WX_MINOR_VERSION_NUMBER).$(WX_RELEASE_NUMBER).tar.bz2
|
||||
WXDEMOS_BZIP = wx$(TOOLKIT)-demos-$(WX_MAJOR_VERSION_NUMBER).$(WX_MINOR_VERSION_NUMBER).$(WX_RELEASE_NUMBER).tar.bz2
|
||||
|
||||
DISTDIR = ./_dist_dir/@DISTDIR@
|
||||
|
||||
|
||||
############################## Files ##################################
|
||||
|
||||
WX_LINGUAS = `cd $(top_srcdir)/locale && ls *.mo 2> /dev/null | sed -n 's/\.mo//p'`
|
||||
@@ -677,6 +684,7 @@ DEMOS_DIST: ALL_GUI_DIST
|
||||
cp $(DEMODIR)/life/*.h $(DISTDIR)/demos/life
|
||||
cp $(DEMODIR)/life/*.xpm $(DISTDIR)/demos/life
|
||||
cp $(DEMODIR)/life/*.inc $(DISTDIR)/demos/life
|
||||
cp $(DEMODIR)/life/*.lif $(DISTDIR)/demos/life
|
||||
cp $(DEMODIR)/life/bitmaps/*.xpm $(DISTDIR)/demos/life/bitmaps
|
||||
|
||||
mkdir $(DISTDIR)/demos/poem
|
||||
@@ -1222,6 +1230,7 @@ distclean:
|
||||
$(RM) -r _dist_dir
|
||||
|
||||
dist: @GUIDIST@
|
||||
cp $(WXDIR)/src/files.lst $(DISTDIR)/src/
|
||||
@echo "*** Creating wxWindows distribution in $(DISTDIR)..."
|
||||
cd _dist_dir; tar ch @DISTDIR@ | gzip -f9 > $(WXARCHIVE); mv $(WXARCHIVE) ..
|
||||
@if test "$(USE_GUI)" = 1; then \
|
||||
@@ -1234,6 +1243,20 @@ dist: @GUIDIST@
|
||||
mv wxDemos demos; \
|
||||
fi
|
||||
|
||||
bzip-dist: @GUIDIST@
|
||||
cp $(WXDIR)/src/files.lst $(DISTDIR)/src/
|
||||
@echo "*** Creating wxWindows distribution in $(DISTDIR)..."
|
||||
cd _dist_dir; tar ch @DISTDIR@ | bzip2 -f9 > $(WXARCHIVE_BZIP); mv $(WXARCHIVE_BZIP) ..
|
||||
@if test "$(USE_GUI)" = 1; then \
|
||||
cd $(DISTDIR); \
|
||||
mv samples wxSamples; \
|
||||
tar ch wxSamples | bzip2 -f9 > ../../$(WXSAMPLES_BZIP); \
|
||||
mv wxSamples samples; \
|
||||
mv demos wxDemos; \
|
||||
tar ch wxDemos | bzip2 -f9 > ../../$(WXDEMOS_BZIP); \
|
||||
mv wxDemos demos; \
|
||||
fi
|
||||
|
||||
debian-dist: @GUIDIST@ MANUAL_DIST PYTHON_DIST
|
||||
mkdir $(DISTDIR)/debian
|
||||
-cp $(WXDIR)/debian/* $(DISTDIR)/debian
|
||||
|
2
configure
vendored
2
configure
vendored
@@ -907,7 +907,7 @@ test "$host_alias" != "$target_alias" &&
|
||||
|
||||
WX_MAJOR_VERSION_NUMBER=2
|
||||
WX_MINOR_VERSION_NUMBER=2
|
||||
WX_RELEASE_NUMBER=0
|
||||
WX_RELEASE_NUMBER=1
|
||||
|
||||
WX_INTERFACE_AGE=0
|
||||
WX_BINARY_AGE=0
|
||||
|
@@ -457,7 +457,7 @@ dnl WX_INTERFACE_AGE = 0
|
||||
|
||||
WX_MAJOR_VERSION_NUMBER=2
|
||||
WX_MINOR_VERSION_NUMBER=2
|
||||
WX_RELEASE_NUMBER=0
|
||||
WX_RELEASE_NUMBER=1
|
||||
|
||||
WX_INTERFACE_AGE=0
|
||||
WX_BINARY_AGE=0
|
||||
|
@@ -197,8 +197,8 @@ public:
|
||||
bool operator==(const wxSize& sz) const { return x == sz.x && y == sz.y; }
|
||||
|
||||
// FIXME are these really useful? If they're, we should have += &c as well
|
||||
wxSize operator+(const wxSize& sz) const { return wxSize(x + sz.x, y + sz.y); }
|
||||
wxSize operator-(const wxSize& sz) const { return wxSize(x - sz.x, y - sz.y); }
|
||||
wxSize operator+(const wxSize& sz) { return wxSize(x + sz.x, y + sz.y); }
|
||||
wxSize operator-(const wxSize& sz) { return wxSize(x - sz.x, y - sz.y); }
|
||||
|
||||
// accessors
|
||||
void Set(int xx, int yy) { x = xx; y = yy; }
|
||||
|
@@ -15,8 +15,8 @@
|
||||
// Bump-up with each new version
|
||||
#define wxMAJOR_VERSION 2
|
||||
#define wxMINOR_VERSION 2
|
||||
#define wxRELEASE_NUMBER 0
|
||||
#define wxVERSION_STRING _T("wxWindows 2.2.0")
|
||||
#define wxRELEASE_NUMBER 1
|
||||
#define wxVERSION_STRING _T("wxWindows 2.2.1")
|
||||
#define wxVERSION_NUMBER (wxMAJOR_VERSION * 1000) + (wxMINOR_VERSION * 100) + wxRELEASE_NUMBER
|
||||
#define wxBETA_NUMBER 0
|
||||
#define wxVERSION_FLOAT wxMAJOR_VERSION + (wxMINOR_VERSION/10.0) + (wxRELEASE_NUMBER/100.0) + (wxBETA_NUMBER/10000.0)
|
||||
|
@@ -110,14 +110,14 @@ bool wxMask::Create( const wxBitmap& bitmap,
|
||||
if (bpp == 15)
|
||||
{
|
||||
red = red & 0xf8;
|
||||
blue = blue & 0xf8;
|
||||
green = green & 0xf8;
|
||||
blue = blue & 0xf8;
|
||||
}
|
||||
if (bpp == 16)
|
||||
{
|
||||
red = red & 0xf8;
|
||||
blue = blue & 0xfc;
|
||||
green = green & 0xf8;
|
||||
green = green & 0xfc;
|
||||
blue = blue & 0xf8;
|
||||
}
|
||||
|
||||
color.red = 0;
|
||||
|
@@ -997,12 +997,12 @@ gtk_pizza_expose_predicate (Display *display,
|
||||
XEvent *xevent,
|
||||
XPointer arg)
|
||||
{
|
||||
if ((xevent->type == Expose) ||
|
||||
((xevent->xany.window == *(Window *)arg) &&
|
||||
if ((xevent->type == Expose) ||
|
||||
((xevent->xany.window == *(Window *)arg) &&
|
||||
(xevent->type == ConfigureNotify)))
|
||||
return True;
|
||||
else
|
||||
return False;
|
||||
return True;
|
||||
else
|
||||
return False;
|
||||
}
|
||||
|
||||
/* This is the main routine to do the scrolling. Scrolling is
|
||||
@@ -1020,40 +1020,40 @@ gtk_pizza_expose_predicate (Display *display,
|
||||
void
|
||||
gtk_pizza_scroll (GtkPizza *pizza, gint dx, gint dy)
|
||||
{
|
||||
GtkWidget *widget;
|
||||
XEvent xevent;
|
||||
GtkWidget *widget;
|
||||
XEvent xevent;
|
||||
|
||||
gint x,y,w,h,border;
|
||||
gint x,y,w,h,border;
|
||||
|
||||
widget = GTK_WIDGET (pizza);
|
||||
widget = GTK_WIDGET (pizza);
|
||||
|
||||
pizza->xoffset += dx;
|
||||
pizza->yoffset += dy;
|
||||
pizza->xoffset += dx;
|
||||
pizza->yoffset += dy;
|
||||
|
||||
if (!GTK_WIDGET_MAPPED (pizza))
|
||||
if (!GTK_WIDGET_MAPPED (pizza))
|
||||
{
|
||||
gtk_pizza_position_children (pizza);
|
||||
return;
|
||||
gtk_pizza_position_children (pizza);
|
||||
return;
|
||||
}
|
||||
|
||||
gtk_pizza_adjust_allocations (pizza, -dx, -dy);
|
||||
gtk_pizza_adjust_allocations (pizza, -dx, -dy);
|
||||
|
||||
if (pizza->shadow_type == GTK_MYSHADOW_NONE)
|
||||
border = 0;
|
||||
else
|
||||
if (pizza->shadow_type == GTK_MYSHADOW_THIN)
|
||||
border = 1;
|
||||
else
|
||||
border = 2;
|
||||
if (pizza->shadow_type == GTK_MYSHADOW_NONE)
|
||||
border = 0;
|
||||
else
|
||||
if (pizza->shadow_type == GTK_MYSHADOW_THIN)
|
||||
border = 1;
|
||||
else
|
||||
border = 2;
|
||||
|
||||
x = 0;
|
||||
y = 0;
|
||||
w = widget->allocation.width - 2*border;
|
||||
h = widget->allocation.height - 2*border;
|
||||
x = 0;
|
||||
y = 0;
|
||||
w = widget->allocation.width - 2*border;
|
||||
h = widget->allocation.height - 2*border;
|
||||
|
||||
if (dx > 0)
|
||||
if (dx > 0)
|
||||
{
|
||||
if (gravity_works)
|
||||
if (gravity_works)
|
||||
{
|
||||
gdk_window_resize (pizza->bin_window,
|
||||
w + dx,
|
||||
@@ -1061,20 +1061,14 @@ gtk_pizza_scroll (GtkPizza *pizza, gint dx, gint dy)
|
||||
gdk_window_move (pizza->bin_window, x-dx, y);
|
||||
gdk_window_move_resize (pizza->bin_window, x, y, w, h );
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
/* FIXME */
|
||||
}
|
||||
|
||||
gtk_pizza_expose_area (pizza,
|
||||
MAX ((gint)w - dx, 0),
|
||||
0,
|
||||
MIN (dx, w),
|
||||
h);
|
||||
}
|
||||
else if (dx < 0)
|
||||
else if (dx < 0)
|
||||
{
|
||||
if (gravity_works)
|
||||
if (gravity_works)
|
||||
{
|
||||
gdk_window_move_resize (pizza->bin_window,
|
||||
x + dx,
|
||||
@@ -1084,102 +1078,73 @@ gtk_pizza_scroll (GtkPizza *pizza, gint dx, gint dy)
|
||||
gdk_window_move (pizza->bin_window, x, y);
|
||||
gdk_window_resize (pizza->bin_window, w, h );
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
/* FIXME */
|
||||
}
|
||||
|
||||
gtk_pizza_expose_area (pizza,
|
||||
0,
|
||||
0,
|
||||
MIN (-dx, w),
|
||||
h);
|
||||
}
|
||||
|
||||
if (dy > 0)
|
||||
if (dy > 0)
|
||||
{
|
||||
if (gravity_works)
|
||||
if (gravity_works)
|
||||
{
|
||||
gdk_window_resize (pizza->bin_window, w, h + dy);
|
||||
gdk_window_move (pizza->bin_window, x, y-dy);
|
||||
gdk_window_move_resize (pizza->bin_window,
|
||||
x, y, w, h );
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
/* FIXME */
|
||||
}
|
||||
|
||||
gtk_pizza_expose_area (pizza,
|
||||
0,
|
||||
MAX ((gint)h - dy, 0),
|
||||
w,
|
||||
MIN (dy, h));
|
||||
}
|
||||
else if (dy < 0)
|
||||
else if (dy < 0)
|
||||
{
|
||||
if (gravity_works)
|
||||
if (gravity_works)
|
||||
{
|
||||
gdk_window_move_resize (pizza->bin_window,
|
||||
x, y+dy, w, h - dy );
|
||||
gdk_window_move (pizza->bin_window, x, y);
|
||||
gdk_window_resize (pizza->bin_window, w, h );
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
/* FIXME */
|
||||
}
|
||||
gtk_pizza_expose_area (pizza,
|
||||
0,
|
||||
0,
|
||||
w,
|
||||
MIN (-dy, (gint)h));
|
||||
}
|
||||
|
||||
gtk_pizza_position_children (pizza);
|
||||
gtk_pizza_position_children (pizza);
|
||||
|
||||
/* We have to make sure that all exposes from this scroll get
|
||||
* processed before we scroll again, or the expose events will
|
||||
* have invalid coordinates.
|
||||
*
|
||||
* We also do expose events for other windows, since otherwise
|
||||
* their updating will fall behind the scrolling
|
||||
*
|
||||
* This also avoids a problem in pre-1.0 GTK where filters don't
|
||||
* have access to configure events that were compressed.
|
||||
*/
|
||||
|
||||
gdk_flush();
|
||||
while (XCheckIfEvent(GDK_WINDOW_XDISPLAY (pizza->bin_window),
|
||||
&xevent,
|
||||
gtk_pizza_expose_predicate,
|
||||
(XPointer)&GDK_WINDOW_XWINDOW (pizza->bin_window)))
|
||||
gdk_flush();
|
||||
while (XCheckIfEvent(GDK_WINDOW_XDISPLAY (pizza->bin_window),
|
||||
&xevent,
|
||||
gtk_pizza_expose_predicate,
|
||||
(XPointer)&GDK_WINDOW_XWINDOW (pizza->bin_window)))
|
||||
{
|
||||
GdkEvent event;
|
||||
GtkWidget *event_widget;
|
||||
GdkEvent event;
|
||||
GtkWidget *event_widget;
|
||||
|
||||
if ((xevent.xany.window == GDK_WINDOW_XWINDOW (pizza->bin_window)) &&
|
||||
(gtk_pizza_filter (&xevent, &event, pizza) == GDK_FILTER_REMOVE))
|
||||
continue;
|
||||
if ((xevent.xany.window == GDK_WINDOW_XWINDOW (pizza->bin_window)) )
|
||||
gtk_pizza_filter (&xevent, &event, pizza);
|
||||
|
||||
if (xevent.type == Expose)
|
||||
if (xevent.type == Expose)
|
||||
{
|
||||
event.expose.window = gdk_window_lookup (xevent.xany.window);
|
||||
gdk_window_get_user_data (event.expose.window,
|
||||
event.expose.window = gdk_window_lookup (xevent.xany.window);
|
||||
gdk_window_get_user_data (event.expose.window,
|
||||
(gpointer *)&event_widget);
|
||||
|
||||
if (event_widget)
|
||||
if (event_widget)
|
||||
{
|
||||
event.expose.type = GDK_EXPOSE;
|
||||
event.expose.area.x = xevent.xexpose.x;
|
||||
event.expose.area.y = xevent.xexpose.y;
|
||||
event.expose.area.width = xevent.xexpose.width;
|
||||
event.expose.area.height = xevent.xexpose.height;
|
||||
event.expose.count = xevent.xexpose.count;
|
||||
event.expose.type = GDK_EXPOSE;
|
||||
event.expose.area.x = xevent.xexpose.x;
|
||||
event.expose.area.y = xevent.xexpose.y;
|
||||
event.expose.area.width = xevent.xexpose.width;
|
||||
event.expose.area.height = xevent.xexpose.height;
|
||||
event.expose.count = xevent.xexpose.count;
|
||||
|
||||
gdk_window_ref (event.expose.window);
|
||||
gtk_widget_event (event_widget, &event);
|
||||
gdk_window_unref (event.expose.window);
|
||||
gdk_window_ref (event.expose.window);
|
||||
gtk_widget_event (event_widget, &event);
|
||||
gdk_window_unref (event.expose.window);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1210,25 +1175,17 @@ gtk_pizza_filter (GdkXEvent *gdk_xevent,
|
||||
if (!pizza->use_filter)
|
||||
return GDK_FILTER_CONTINUE;
|
||||
|
||||
switch (xevent->type)
|
||||
switch (xevent->type)
|
||||
{
|
||||
case Expose:
|
||||
if (xevent->xexpose.serial == pizza->configure_serial)
|
||||
{
|
||||
if (pizza->visibility == GDK_VISIBILITY_UNOBSCURED)
|
||||
return GDK_FILTER_REMOVE;
|
||||
else
|
||||
{
|
||||
xevent->xexpose.x += pizza->scroll_x;
|
||||
xevent->xexpose.y += pizza->scroll_y;
|
||||
|
||||
break;
|
||||
}
|
||||
xevent->xexpose.x += pizza->scroll_x;
|
||||
xevent->xexpose.y += pizza->scroll_y;
|
||||
}
|
||||
break;
|
||||
|
||||
case ConfigureNotify:
|
||||
if ((xevent->xconfigure.x != 0) || (xevent->xconfigure.y != 0))
|
||||
{
|
||||
pizza->configure_serial = xevent->xconfigure.serial;
|
||||
pizza->scroll_x = xevent->xconfigure.x;
|
||||
@@ -1282,8 +1239,6 @@ gtk_pizza_main_filter (GdkXEvent *gdk_xevent,
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
@@ -110,14 +110,14 @@ bool wxMask::Create( const wxBitmap& bitmap,
|
||||
if (bpp == 15)
|
||||
{
|
||||
red = red & 0xf8;
|
||||
blue = blue & 0xf8;
|
||||
green = green & 0xf8;
|
||||
blue = blue & 0xf8;
|
||||
}
|
||||
if (bpp == 16)
|
||||
{
|
||||
red = red & 0xf8;
|
||||
blue = blue & 0xfc;
|
||||
green = green & 0xf8;
|
||||
green = green & 0xfc;
|
||||
blue = blue & 0xf8;
|
||||
}
|
||||
|
||||
color.red = 0;
|
||||
|
@@ -997,12 +997,12 @@ gtk_pizza_expose_predicate (Display *display,
|
||||
XEvent *xevent,
|
||||
XPointer arg)
|
||||
{
|
||||
if ((xevent->type == Expose) ||
|
||||
((xevent->xany.window == *(Window *)arg) &&
|
||||
if ((xevent->type == Expose) ||
|
||||
((xevent->xany.window == *(Window *)arg) &&
|
||||
(xevent->type == ConfigureNotify)))
|
||||
return True;
|
||||
else
|
||||
return False;
|
||||
return True;
|
||||
else
|
||||
return False;
|
||||
}
|
||||
|
||||
/* This is the main routine to do the scrolling. Scrolling is
|
||||
@@ -1020,40 +1020,40 @@ gtk_pizza_expose_predicate (Display *display,
|
||||
void
|
||||
gtk_pizza_scroll (GtkPizza *pizza, gint dx, gint dy)
|
||||
{
|
||||
GtkWidget *widget;
|
||||
XEvent xevent;
|
||||
GtkWidget *widget;
|
||||
XEvent xevent;
|
||||
|
||||
gint x,y,w,h,border;
|
||||
gint x,y,w,h,border;
|
||||
|
||||
widget = GTK_WIDGET (pizza);
|
||||
widget = GTK_WIDGET (pizza);
|
||||
|
||||
pizza->xoffset += dx;
|
||||
pizza->yoffset += dy;
|
||||
pizza->xoffset += dx;
|
||||
pizza->yoffset += dy;
|
||||
|
||||
if (!GTK_WIDGET_MAPPED (pizza))
|
||||
if (!GTK_WIDGET_MAPPED (pizza))
|
||||
{
|
||||
gtk_pizza_position_children (pizza);
|
||||
return;
|
||||
gtk_pizza_position_children (pizza);
|
||||
return;
|
||||
}
|
||||
|
||||
gtk_pizza_adjust_allocations (pizza, -dx, -dy);
|
||||
gtk_pizza_adjust_allocations (pizza, -dx, -dy);
|
||||
|
||||
if (pizza->shadow_type == GTK_MYSHADOW_NONE)
|
||||
border = 0;
|
||||
else
|
||||
if (pizza->shadow_type == GTK_MYSHADOW_THIN)
|
||||
border = 1;
|
||||
else
|
||||
border = 2;
|
||||
if (pizza->shadow_type == GTK_MYSHADOW_NONE)
|
||||
border = 0;
|
||||
else
|
||||
if (pizza->shadow_type == GTK_MYSHADOW_THIN)
|
||||
border = 1;
|
||||
else
|
||||
border = 2;
|
||||
|
||||
x = 0;
|
||||
y = 0;
|
||||
w = widget->allocation.width - 2*border;
|
||||
h = widget->allocation.height - 2*border;
|
||||
x = 0;
|
||||
y = 0;
|
||||
w = widget->allocation.width - 2*border;
|
||||
h = widget->allocation.height - 2*border;
|
||||
|
||||
if (dx > 0)
|
||||
if (dx > 0)
|
||||
{
|
||||
if (gravity_works)
|
||||
if (gravity_works)
|
||||
{
|
||||
gdk_window_resize (pizza->bin_window,
|
||||
w + dx,
|
||||
@@ -1061,20 +1061,14 @@ gtk_pizza_scroll (GtkPizza *pizza, gint dx, gint dy)
|
||||
gdk_window_move (pizza->bin_window, x-dx, y);
|
||||
gdk_window_move_resize (pizza->bin_window, x, y, w, h );
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
/* FIXME */
|
||||
}
|
||||
|
||||
gtk_pizza_expose_area (pizza,
|
||||
MAX ((gint)w - dx, 0),
|
||||
0,
|
||||
MIN (dx, w),
|
||||
h);
|
||||
}
|
||||
else if (dx < 0)
|
||||
else if (dx < 0)
|
||||
{
|
||||
if (gravity_works)
|
||||
if (gravity_works)
|
||||
{
|
||||
gdk_window_move_resize (pizza->bin_window,
|
||||
x + dx,
|
||||
@@ -1084,102 +1078,73 @@ gtk_pizza_scroll (GtkPizza *pizza, gint dx, gint dy)
|
||||
gdk_window_move (pizza->bin_window, x, y);
|
||||
gdk_window_resize (pizza->bin_window, w, h );
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
/* FIXME */
|
||||
}
|
||||
|
||||
gtk_pizza_expose_area (pizza,
|
||||
0,
|
||||
0,
|
||||
MIN (-dx, w),
|
||||
h);
|
||||
}
|
||||
|
||||
if (dy > 0)
|
||||
if (dy > 0)
|
||||
{
|
||||
if (gravity_works)
|
||||
if (gravity_works)
|
||||
{
|
||||
gdk_window_resize (pizza->bin_window, w, h + dy);
|
||||
gdk_window_move (pizza->bin_window, x, y-dy);
|
||||
gdk_window_move_resize (pizza->bin_window,
|
||||
x, y, w, h );
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
/* FIXME */
|
||||
}
|
||||
|
||||
gtk_pizza_expose_area (pizza,
|
||||
0,
|
||||
MAX ((gint)h - dy, 0),
|
||||
w,
|
||||
MIN (dy, h));
|
||||
}
|
||||
else if (dy < 0)
|
||||
else if (dy < 0)
|
||||
{
|
||||
if (gravity_works)
|
||||
if (gravity_works)
|
||||
{
|
||||
gdk_window_move_resize (pizza->bin_window,
|
||||
x, y+dy, w, h - dy );
|
||||
gdk_window_move (pizza->bin_window, x, y);
|
||||
gdk_window_resize (pizza->bin_window, w, h );
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
/* FIXME */
|
||||
}
|
||||
gtk_pizza_expose_area (pizza,
|
||||
0,
|
||||
0,
|
||||
w,
|
||||
MIN (-dy, (gint)h));
|
||||
}
|
||||
|
||||
gtk_pizza_position_children (pizza);
|
||||
gtk_pizza_position_children (pizza);
|
||||
|
||||
/* We have to make sure that all exposes from this scroll get
|
||||
* processed before we scroll again, or the expose events will
|
||||
* have invalid coordinates.
|
||||
*
|
||||
* We also do expose events for other windows, since otherwise
|
||||
* their updating will fall behind the scrolling
|
||||
*
|
||||
* This also avoids a problem in pre-1.0 GTK where filters don't
|
||||
* have access to configure events that were compressed.
|
||||
*/
|
||||
|
||||
gdk_flush();
|
||||
while (XCheckIfEvent(GDK_WINDOW_XDISPLAY (pizza->bin_window),
|
||||
&xevent,
|
||||
gtk_pizza_expose_predicate,
|
||||
(XPointer)&GDK_WINDOW_XWINDOW (pizza->bin_window)))
|
||||
gdk_flush();
|
||||
while (XCheckIfEvent(GDK_WINDOW_XDISPLAY (pizza->bin_window),
|
||||
&xevent,
|
||||
gtk_pizza_expose_predicate,
|
||||
(XPointer)&GDK_WINDOW_XWINDOW (pizza->bin_window)))
|
||||
{
|
||||
GdkEvent event;
|
||||
GtkWidget *event_widget;
|
||||
GdkEvent event;
|
||||
GtkWidget *event_widget;
|
||||
|
||||
if ((xevent.xany.window == GDK_WINDOW_XWINDOW (pizza->bin_window)) &&
|
||||
(gtk_pizza_filter (&xevent, &event, pizza) == GDK_FILTER_REMOVE))
|
||||
continue;
|
||||
if ((xevent.xany.window == GDK_WINDOW_XWINDOW (pizza->bin_window)) )
|
||||
gtk_pizza_filter (&xevent, &event, pizza);
|
||||
|
||||
if (xevent.type == Expose)
|
||||
if (xevent.type == Expose)
|
||||
{
|
||||
event.expose.window = gdk_window_lookup (xevent.xany.window);
|
||||
gdk_window_get_user_data (event.expose.window,
|
||||
event.expose.window = gdk_window_lookup (xevent.xany.window);
|
||||
gdk_window_get_user_data (event.expose.window,
|
||||
(gpointer *)&event_widget);
|
||||
|
||||
if (event_widget)
|
||||
if (event_widget)
|
||||
{
|
||||
event.expose.type = GDK_EXPOSE;
|
||||
event.expose.area.x = xevent.xexpose.x;
|
||||
event.expose.area.y = xevent.xexpose.y;
|
||||
event.expose.area.width = xevent.xexpose.width;
|
||||
event.expose.area.height = xevent.xexpose.height;
|
||||
event.expose.count = xevent.xexpose.count;
|
||||
event.expose.type = GDK_EXPOSE;
|
||||
event.expose.area.x = xevent.xexpose.x;
|
||||
event.expose.area.y = xevent.xexpose.y;
|
||||
event.expose.area.width = xevent.xexpose.width;
|
||||
event.expose.area.height = xevent.xexpose.height;
|
||||
event.expose.count = xevent.xexpose.count;
|
||||
|
||||
gdk_window_ref (event.expose.window);
|
||||
gtk_widget_event (event_widget, &event);
|
||||
gdk_window_unref (event.expose.window);
|
||||
gdk_window_ref (event.expose.window);
|
||||
gtk_widget_event (event_widget, &event);
|
||||
gdk_window_unref (event.expose.window);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1210,25 +1175,17 @@ gtk_pizza_filter (GdkXEvent *gdk_xevent,
|
||||
if (!pizza->use_filter)
|
||||
return GDK_FILTER_CONTINUE;
|
||||
|
||||
switch (xevent->type)
|
||||
switch (xevent->type)
|
||||
{
|
||||
case Expose:
|
||||
if (xevent->xexpose.serial == pizza->configure_serial)
|
||||
{
|
||||
if (pizza->visibility == GDK_VISIBILITY_UNOBSCURED)
|
||||
return GDK_FILTER_REMOVE;
|
||||
else
|
||||
{
|
||||
xevent->xexpose.x += pizza->scroll_x;
|
||||
xevent->xexpose.y += pizza->scroll_y;
|
||||
|
||||
break;
|
||||
}
|
||||
xevent->xexpose.x += pizza->scroll_x;
|
||||
xevent->xexpose.y += pizza->scroll_y;
|
||||
}
|
||||
break;
|
||||
|
||||
case ConfigureNotify:
|
||||
if ((xevent->xconfigure.x != 0) || (xevent->xconfigure.y != 0))
|
||||
{
|
||||
pizza->configure_serial = xevent->xconfigure.serial;
|
||||
pizza->scroll_x = xevent->xconfigure.x;
|
||||
@@ -1282,8 +1239,6 @@ gtk_pizza_main_filter (GdkXEvent *gdk_xevent,
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
@@ -1,6 +1,6 @@
|
||||
# Note that this is NOT a relocatable package
|
||||
%define pref /usr
|
||||
%define ver 2.2.0
|
||||
%define ver 2.2.1
|
||||
%define rel 0
|
||||
|
||||
Summary: The GTK+ 1.2 port of the wxWindows library
|
||||
|
Reference in New Issue
Block a user