+ GtkPizza *pizza = GTK_PIZZA(widget);
+ if (gdk_event->window != pizza->bin_window) return TRUE;
+
+ int style = win->GetWindowStyle();
+
+ int y = (int)gdk_event->y;
+ int x = (int)gdk_event->x;
+
+ if ((style & wxRESIZE_BORDER) &&
+ (x > win->m_width-14) && (y > win->m_height-14))
+ {
+ GtkWidget *ancestor = gtk_widget_get_toplevel( widget );
+
+ GdkWindow *source = GTK_PIZZA(widget)->bin_window;
+
+ int org_x = 0;
+ int org_y = 0;
+ gdk_window_get_origin( source, &org_x, &org_y );
+
+ gtk_window_begin_resize_drag (GTK_WINDOW (ancestor),
+ GDK_WINDOW_EDGE_SOUTH_EAST,
+ 1,
+ org_x + x,
+ org_y + y,
+ 0);
+
+ return TRUE;
+ }
+
+ if ((style & wxCLOSE_BOX) &&
+ ((style & wxCAPTION) || (style & wxTINY_CAPTION_HORIZ) || (style & wxTINY_CAPTION_VERT)))
+ {
+ if ((y > 3) && (y < 19) && (x > win->m_width-19) && (x < win->m_width-3))
+ {
+ win->Close();
+ return TRUE;
+ }
+ }
+
+ wxClientDC dc(win);
+ dc.SetFont( *wxSMALL_FONT );
+ int height = dc.GetCharHeight() + 1;
+
+
+ if (y > height) return TRUE;
+