- wxPizza *pizza = WX_PIZZA(widget);
- GdkWindow *backing_window = pizza->m_backing_window;
-
- int w = widget->allocation.width;
- int h = widget->allocation.height;
-
- // if this event is for the border-only GdkWindow
- if (backing_window && gdk_event->window == pizza->m_backing_window)
- {
- if (win->HasFlag(wxBORDER_SIMPLE))
- {
- GdkGC* gc = gdk_gc_new(gdk_event->window);
- gdk_gc_set_foreground(gc, &widget->style->black);
- gdk_draw_rectangle(gdk_event->window, gc, false, 0, 0, w - 1, h - 1);
- g_object_unref(gc);
- }
- else
- {
- GtkShadowType shadow = GTK_SHADOW_IN;
- if (win->HasFlag(wxBORDER_RAISED))
- shadow = GTK_SHADOW_OUT;
- gtk_paint_shadow(
- widget->style, gdk_event->window, GTK_STATE_NORMAL,
- shadow, NULL, widget, "viewport", 0, 0, w, h);
- }
-
- return TRUE;
- }
-