Commit 8860615d authored by Havoc Pennington's avatar Havoc Pennington Committed by Havoc Pennington

use _gdk_region_get_xrectangles()

2001-03-02  Havoc Pennington  <hp@redhat.com>

	* gdk/x11/gdkgc-x11.c (_gdk_x11_gc_flush): use
	_gdk_region_get_xrectangles()

	* gdk/x11/gdkmain-x11.c (_gdk_region_get_xrectangles): new function

	* gtk/testgtk.c (create_shapes): add test for shape_combine_region

	* gdk/x11/gdkwindow-x11.c (gdk_window_shape_combine_region): new
	function, contributed by Ron Steinke

	* gdk/x11/gdkevents-x11.c (gdk_wmspec_supported): rename
	gdk_net_wm_supports

	* gdk/gdkregion-generic.c (gdk_region_get_rectangles):
	New function, contributed by Ron Steinke

	* gtk/gtkentry.c (gtk_entry_get_layout_offsets): New function,
	used to line up the text in the entry when using the entry for
	editable sheet cell hacks

	* gtk/testgtk.c (create_entry): test the activate_default setting
	on GtkEntry

	* gtk/gtkentry.c (gtk_entry_set_activates_default): New function to
	cause the entry to activate the default button for a dialog when
	activated
	(gtk_entry_get_activates_default): new function
parent b0052ec8
2001-03-02 Havoc Pennington <hp@redhat.com>
* gdk/x11/gdkgc-x11.c (_gdk_x11_gc_flush): use
_gdk_region_get_xrectangles()
* gdk/x11/gdkmain-x11.c (_gdk_region_get_xrectangles): new function
* gtk/testgtk.c (create_shapes): add test for shape_combine_region
* gdk/x11/gdkwindow-x11.c (gdk_window_shape_combine_region): new
function, contributed by Ron Steinke
* gdk/x11/gdkevents-x11.c (gdk_wmspec_supported): rename
gdk_net_wm_supports
* gdk/gdkregion-generic.c (gdk_region_get_rectangles):
New function, contributed by Ron Steinke
* gtk/gtkentry.c (gtk_entry_get_layout_offsets): New function,
used to line up the text in the entry when using the entry for
editable sheet cell hacks
* gtk/testgtk.c (create_entry): test the activate_default setting
on GtkEntry
* gtk/gtkentry.c (gtk_entry_set_activates_default): New function to
cause the entry to activate the default button for a dialog when
activated
(gtk_entry_get_activates_default): new function
Wed Feb 28 19:10:43 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtkclist.c (real_remove_row): Patch from ChiDeok
......
2001-03-02 Havoc Pennington <hp@redhat.com>
* gdk/x11/gdkgc-x11.c (_gdk_x11_gc_flush): use
_gdk_region_get_xrectangles()
* gdk/x11/gdkmain-x11.c (_gdk_region_get_xrectangles): new function
* gtk/testgtk.c (create_shapes): add test for shape_combine_region
* gdk/x11/gdkwindow-x11.c (gdk_window_shape_combine_region): new
function, contributed by Ron Steinke
* gdk/x11/gdkevents-x11.c (gdk_wmspec_supported): rename
gdk_net_wm_supports
* gdk/gdkregion-generic.c (gdk_region_get_rectangles):
New function, contributed by Ron Steinke
* gtk/gtkentry.c (gtk_entry_get_layout_offsets): New function,
used to line up the text in the entry when using the entry for
editable sheet cell hacks
* gtk/testgtk.c (create_entry): test the activate_default setting
on GtkEntry
* gtk/gtkentry.c (gtk_entry_set_activates_default): New function to
cause the entry to activate the default button for a dialog when
activated
(gtk_entry_get_activates_default): new function
Wed Feb 28 19:10:43 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtkclist.c (real_remove_row): Patch from ChiDeok
......
2001-03-02 Havoc Pennington <hp@redhat.com>
* gdk/x11/gdkgc-x11.c (_gdk_x11_gc_flush): use
_gdk_region_get_xrectangles()
* gdk/x11/gdkmain-x11.c (_gdk_region_get_xrectangles): new function
* gtk/testgtk.c (create_shapes): add test for shape_combine_region
* gdk/x11/gdkwindow-x11.c (gdk_window_shape_combine_region): new
function, contributed by Ron Steinke
* gdk/x11/gdkevents-x11.c (gdk_wmspec_supported): rename
gdk_net_wm_supports
* gdk/gdkregion-generic.c (gdk_region_get_rectangles):
New function, contributed by Ron Steinke
* gtk/gtkentry.c (gtk_entry_get_layout_offsets): New function,
used to line up the text in the entry when using the entry for
editable sheet cell hacks
* gtk/testgtk.c (create_entry): test the activate_default setting
on GtkEntry
* gtk/gtkentry.c (gtk_entry_set_activates_default): New function to
cause the entry to activate the default button for a dialog when
activated
(gtk_entry_get_activates_default): new function
Wed Feb 28 19:10:43 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtkclist.c (real_remove_row): Patch from ChiDeok
......
2001-03-02 Havoc Pennington <hp@redhat.com>
* gdk/x11/gdkgc-x11.c (_gdk_x11_gc_flush): use
_gdk_region_get_xrectangles()
* gdk/x11/gdkmain-x11.c (_gdk_region_get_xrectangles): new function
* gtk/testgtk.c (create_shapes): add test for shape_combine_region
* gdk/x11/gdkwindow-x11.c (gdk_window_shape_combine_region): new
function, contributed by Ron Steinke
* gdk/x11/gdkevents-x11.c (gdk_wmspec_supported): rename
gdk_net_wm_supports
* gdk/gdkregion-generic.c (gdk_region_get_rectangles):
New function, contributed by Ron Steinke
* gtk/gtkentry.c (gtk_entry_get_layout_offsets): New function,
used to line up the text in the entry when using the entry for
editable sheet cell hacks
* gtk/testgtk.c (create_entry): test the activate_default setting
on GtkEntry
* gtk/gtkentry.c (gtk_entry_set_activates_default): New function to
cause the entry to activate the default button for a dialog when
activated
(gtk_entry_get_activates_default): new function
Wed Feb 28 19:10:43 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtkclist.c (real_remove_row): Patch from ChiDeok
......
2001-03-02 Havoc Pennington <hp@redhat.com>
* gdk/x11/gdkgc-x11.c (_gdk_x11_gc_flush): use
_gdk_region_get_xrectangles()
* gdk/x11/gdkmain-x11.c (_gdk_region_get_xrectangles): new function
* gtk/testgtk.c (create_shapes): add test for shape_combine_region
* gdk/x11/gdkwindow-x11.c (gdk_window_shape_combine_region): new
function, contributed by Ron Steinke
* gdk/x11/gdkevents-x11.c (gdk_wmspec_supported): rename
gdk_net_wm_supports
* gdk/gdkregion-generic.c (gdk_region_get_rectangles):
New function, contributed by Ron Steinke
* gtk/gtkentry.c (gtk_entry_get_layout_offsets): New function,
used to line up the text in the entry when using the entry for
editable sheet cell hacks
* gtk/testgtk.c (create_entry): test the activate_default setting
on GtkEntry
* gtk/gtkentry.c (gtk_entry_set_activates_default): New function to
cause the entry to activate the default button for a dialog when
activated
(gtk_entry_get_activates_default): new function
Wed Feb 28 19:10:43 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtkclist.c (real_remove_row): Patch from ChiDeok
......
2001-03-02 Havoc Pennington <hp@redhat.com>
* gdk/x11/gdkgc-x11.c (_gdk_x11_gc_flush): use
_gdk_region_get_xrectangles()
* gdk/x11/gdkmain-x11.c (_gdk_region_get_xrectangles): new function
* gtk/testgtk.c (create_shapes): add test for shape_combine_region
* gdk/x11/gdkwindow-x11.c (gdk_window_shape_combine_region): new
function, contributed by Ron Steinke
* gdk/x11/gdkevents-x11.c (gdk_wmspec_supported): rename
gdk_net_wm_supports
* gdk/gdkregion-generic.c (gdk_region_get_rectangles):
New function, contributed by Ron Steinke
* gtk/gtkentry.c (gtk_entry_get_layout_offsets): New function,
used to line up the text in the entry when using the entry for
editable sheet cell hacks
* gtk/testgtk.c (create_entry): test the activate_default setting
on GtkEntry
* gtk/gtkentry.c (gtk_entry_set_activates_default): New function to
cause the entry to activate the default button for a dialog when
activated
(gtk_entry_get_activates_default): new function
Wed Feb 28 19:10:43 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtkclist.c (real_remove_row): Patch from ChiDeok
......
2001-03-02 Havoc Pennington <hp@redhat.com>
* gdk/x11/gdkgc-x11.c (_gdk_x11_gc_flush): use
_gdk_region_get_xrectangles()
* gdk/x11/gdkmain-x11.c (_gdk_region_get_xrectangles): new function
* gtk/testgtk.c (create_shapes): add test for shape_combine_region
* gdk/x11/gdkwindow-x11.c (gdk_window_shape_combine_region): new
function, contributed by Ron Steinke
* gdk/x11/gdkevents-x11.c (gdk_wmspec_supported): rename
gdk_net_wm_supports
* gdk/gdkregion-generic.c (gdk_region_get_rectangles):
New function, contributed by Ron Steinke
* gtk/gtkentry.c (gtk_entry_get_layout_offsets): New function,
used to line up the text in the entry when using the entry for
editable sheet cell hacks
* gtk/testgtk.c (create_entry): test the activate_default setting
on GtkEntry
* gtk/gtkentry.c (gtk_entry_set_activates_default): New function to
cause the entry to activate the default button for a dialog when
activated
(gtk_entry_get_activates_default): new function
Wed Feb 28 19:10:43 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtkclist.c (real_remove_row): Patch from ChiDeok
......
......@@ -186,6 +186,42 @@ gdk_region_get_clipbox (GdkRegion *r, GdkRectangle *rect)
rect->height = r->extents.y2 - r->extents.y1;
}
/**
* gdk_region_get_rectangles:
* @region: a #GdkRegion
* @rectangles: return location for an array of rectangles
* @n_rectangles: length of returned array
*
* Obtains the area covered by the region as a list of rectangles.
* The array returned in @rectangles must be freed with g_free().
*
**/
void
gdk_region_get_rectangles (GdkRegion *region,
GdkRectangle **rectangles,
gint *n_rectangles)
{
gint i;
g_return_if_fail (region != NULL);
g_return_if_fail (rectangles != NULL);
g_return_if_fail (n_rectangles != NULL);
*n_rectangles = region->numRects;
*rectangles = g_new (GdkRectangle, region->numRects);
for (i = 0; i < region->numRects; i++)
{
GdkRegionBox rect;
rect = region->rects[i];
(*rectangles)[i].x = rect.x1;
(*rectangles)[i].y = rect.y1;
(*rectangles)[i].width = rect.x2 - rect.x1;
(*rectangles)[i].height = rect.y2 - rect.y1;
}
}
void
gdk_region_union_with_rect (GdkRegion *region,
GdkRectangle *rect)
......
......@@ -40,8 +40,11 @@ GdkRegion *gdk_region_copy (GdkRegion *region);
GdkRegion *gdk_region_rectangle (GdkRectangle *rectangle);
void gdk_region_destroy (GdkRegion *region);
void gdk_region_get_clipbox (GdkRegion *region,
GdkRectangle *rectangle);
void gdk_region_get_clipbox (GdkRegion *region,
GdkRectangle *rectangle);
void gdk_region_get_rectangles (GdkRegion *region,
GdkRectangle **rectangles,
gint *n_rectangles);
gboolean gdk_region_empty (GdkRegion *region);
gboolean gdk_region_equal (GdkRegion *region1,
......
......@@ -278,10 +278,15 @@ void gdk_window_scroll (GdkWindow *window,
* The shape_mask can be the mask
* from gdk_pixmap_create_from_xpm. Stefan Wille
*/
void gdk_window_shape_combine_mask (GdkWindow *window,
GdkBitmap *shape_mask,
gint offset_x,
gint offset_y);
void gdk_window_shape_combine_mask (GdkWindow *window,
GdkBitmap *shape_mask,
gint offset_x,
gint offset_y);
void gdk_window_shape_combine_region (GdkWindow *window,
GdkRegion *shape_region,
gint offset_x,
gint offset_y);
/*
* This routine allows you to quickly take the shapes of all the child windows
* of a window and use their shapes as the shape mask for this window - useful
......
......@@ -1756,7 +1756,7 @@ gdk_x11_get_server_time (GdkWindow *window)
gboolean
gdk_wmspec_supported (GdkAtom property)
gdk_net_wm_supports (GdkAtom property)
{
static GdkAtom wmspec_check_atom = 0;
static GdkAtom wmspec_supported_atom = 0;
......@@ -1840,7 +1840,7 @@ gdk_wmspec_supported (GdkAtom property)
XFree (xwindow);
/* since wmspec_check_window != None this isn't infinite. ;-) */
return gdk_wmspec_supported (property);
return gdk_net_wm_supports (property);
}
......
......@@ -190,21 +190,19 @@ _gdk_x11_gc_flush (GdkGC *gc)
gc->clip_x_origin, gc->clip_y_origin);
else
{
XRectangle *rectangles = g_new (XRectangle, private->clip_region->numRects);
GdkRegionBox *boxes = private->clip_region->rects;
int i;
for (i=0; i<private->clip_region->numRects; i++)
{
rectangles[i].x = CLAMP (boxes[i].x1 + gc->clip_x_origin, G_MINSHORT, G_MAXSHORT);
rectangles[i].y = CLAMP (boxes[i].y1 + gc->clip_y_origin, G_MINSHORT, G_MAXSHORT);
rectangles[i].width = CLAMP (boxes[i].x2 + gc->clip_x_origin, G_MINSHORT, G_MAXSHORT) - rectangles[i].x;
rectangles[i].height = CLAMP (boxes[i].y2 + gc->clip_y_origin, G_MINSHORT, G_MAXSHORT) - rectangles[i].y;
}
XRectangle *rectangles;
gint n_rects;
_gdk_region_get_xrectangles (private->clip_region,
gc->clip_x_origin,
gc->clip_y_origin,
&rectangles,
&n_rects);
XSetClipRectangles(GDK_GC_XDISPLAY (gc), GDK_GC_XGC (gc), 0, 0, rectangles,
private->clip_region->numRects, YXBanded);
XSetClipRectangles (GDK_GC_XDISPLAY (gc), GDK_GC_XGC (gc), 0, 0,
rectangles,
n_rects, YXBanded);
g_free (rectangles);
}
}
......
......@@ -53,6 +53,7 @@
#include "gdkprivate-x11.h"
#include "gdkinternals.h"
#include "gdkregion-generic.h"
#include "gdkinputprivate.h"
#include <pango/pangox.h>
......@@ -737,3 +738,26 @@ gdk_send_xevent (Window window, gboolean propagate, glong event_mask,
return result && !gdk_error_code;
}
void
_gdk_region_get_xrectangles (GdkRegion *region,
gint x_offset,
gint y_offset,
XRectangle **rects,
gint *n_rects)
{
XRectangle *rectangles = g_new (XRectangle, region->numRects);
GdkRegionBox *boxes = region->rects;
gint i;
for (i = 0; i < region->numRects; i++)
{
rectangles[i].x = CLAMP (boxes[i].x1 + x_offset, G_MINSHORT, G_MAXSHORT);
rectangles[i].y = CLAMP (boxes[i].y1 + y_offset, G_MINSHORT, G_MAXSHORT);
rectangles[i].width = CLAMP (boxes[i].x2 + x_offset, G_MINSHORT, G_MAXSHORT) - rectangles[i].x;
rectangles[i].height = CLAMP (boxes[i].y2 + y_offset, G_MINSHORT, G_MAXSHORT) - rectangles[i].y;
}
*rects = rectangles;
*n_rects = region->numRects;
}
......@@ -86,6 +86,12 @@ void _gdk_window_process_expose (GdkWindow *window,
void _gdk_selection_window_destroyed (GdkWindow *window);
gboolean _gdk_selection_filter_clear_event (XSelectionClearEvent *event);
void _gdk_region_get_xrectangles (GdkRegion *region,
gint x_offset,
gint y_offset,
XRectangle **rects,
gint *n_rects);
extern GdkDrawableClass _gdk_x11_drawable_class;
extern gboolean gdk_use_xshm;
extern Atom gdk_wm_delete_window;
......
......@@ -1066,7 +1066,7 @@ gdk_window_focus (GdkWindow *window,
if (GDK_WINDOW_DESTROYED (window))
return;
if (gdk_wmspec_supported (gdk_atom_intern ("_NET_ACTIVE_WINDOW", FALSE)))
if (gdk_net_wm_supports (gdk_atom_intern ("_NET_ACTIVE_WINDOW", FALSE)))
{
XEvent xev;
......@@ -1831,6 +1831,8 @@ gdk_window_have_shape_ext (void)
return (have_shape == YES);
}
#define WARN_SHAPE_TOO_BIG() g_warning ("GdkWindow is too large to allow the use of shape masks or shape regions.")
/*
* This needs the X11 shape extension.
* If not available, shaped windows will look
......@@ -1842,6 +1844,7 @@ gdk_window_shape_combine_mask (GdkWindow *window,
gint x, gint y)
{
Pixmap pixmap;
gint xoffset, yoffset;
g_return_if_fail (window != NULL);
g_return_if_fail (GDK_IS_WINDOW (window));
......@@ -1849,6 +1852,14 @@ gdk_window_shape_combine_mask (GdkWindow *window,
#ifdef HAVE_SHAPE_EXT
if (GDK_WINDOW_DESTROYED (window))
return;
_gdk_windowing_window_get_offsets (window, &xoffset, &yoffset);
if (xoffset != 0 || yoffset != 0)
{
WARN_SHAPE_TOO_BIG ();
return;
}
if (gdk_window_have_shape_ext ())
{
......@@ -1873,6 +1884,58 @@ gdk_window_shape_combine_mask (GdkWindow *window,
#endif /* HAVE_SHAPE_EXT */
}
void
gdk_window_shape_combine_region (GdkWindow *window,
GdkRegion *shape_region,
gint offset_x,
gint offset_y)
{
gint xoffset, yoffset;
g_return_if_fail (GDK_IS_WINDOW (window));
#ifdef HAVE_SHAPE_EXT
if (GDK_WINDOW_DESTROYED (window))
return;
_gdk_windowing_window_get_offsets (window, &xoffset, &yoffset);
if (xoffset != 0 || yoffset != 0)
{
WARN_SHAPE_TOO_BIG ();
return;
}
if (shape_region == NULL)
{
/* Use NULL mask to unset the shape */
gdk_window_shape_combine_mask (window, NULL, 0, 0);
return;
}
if (gdk_window_have_shape_ext ())
{
gint n_rects = 0;
XRectangle *xrects = NULL;
_gdk_region_get_xrectangles (shape_region,
0, 0,
&xrects, &n_rects);
XShapeCombineRectangles (GDK_WINDOW_XDISPLAY (window),
GDK_WINDOW_XID (window),
ShapeBounding,
offset_x, offset_y,
xrects, n_rects,
ShapeSet,
YXBanded);
g_free (xrects);
}
#endif /* HAVE_SHAPE_EXT */
}
void
gdk_window_set_override_redirect (GdkWindow *window,
gboolean override_redirect)
......
......@@ -186,7 +186,7 @@ gpointer gdk_xid_table_lookup (XID xid);
guint32 gdk_x11_get_server_time (GdkWindow *window);
/* returns TRUE if we support the given WM spec feature */
gboolean gdk_wmspec_supported (GdkAtom property);
gboolean gdk_net_wm_supports (GdkAtom property);
#define gdk_window_lookup(xid) ((GdkWindow*) gdk_xid_table_lookup (xid))
#define gdk_pixmap_lookup(xid) ((GdkPixmap*) gdk_xid_table_lookup (xid))
......
......@@ -41,6 +41,7 @@
#include "gtkseparatormenuitem.h"
#include "gtkselection.h"
#include "gtksignal.h"
#include "gtkwindow.h"
#define MIN_ENTRY_WIDTH 150
#define DRAW_TIMEOUT 20
......@@ -73,7 +74,8 @@ enum {
PROP_EDITABLE,
PROP_MAX_LENGTH,
PROP_VISIBILITY,
PROP_INVISIBLE_CHAR
PROP_INVISIBLE_CHAR,
PROP_ACTIVATES_DEFAULT
};
static guint signals[LAST_SIGNAL] = { 0 };
......@@ -205,6 +207,7 @@ static void gtk_entry_cut_clipboard (GtkEntry *entry);
static void gtk_entry_copy_clipboard (GtkEntry *entry);
static void gtk_entry_paste_clipboard (GtkEntry *entry);
static void gtk_entry_toggle_overwrite (GtkEntry *entry);
static void gtk_entry_real_activate (GtkEntry *entry);
/* IM Context Callbacks
*/
......@@ -355,7 +358,8 @@ gtk_entry_class_init (GtkEntryClass *class)
class->copy_clipboard = gtk_entry_copy_clipboard;
class->paste_clipboard = gtk_entry_paste_clipboard;
class->toggle_overwrite = gtk_entry_toggle_overwrite;
class->activate = gtk_entry_real_activate;
g_object_class_install_property (gobject_class,
PROP_TEXT_POSITION,
g_param_spec_int ("text_position",
......@@ -401,6 +405,14 @@ gtk_entry_class_init (GtkEntryClass *class)
'*',
G_PARAM_READABLE | G_PARAM_WRITABLE));
g_object_class_install_property (gobject_class,
PROP_ACTIVATES_DEFAULT,
g_param_spec_boolean ("activates_default",
_("Activates default"),
_("Whether to activate the default widget (such as the default button in a dialog) when Enter is pressed."),
FALSE,
G_PARAM_READABLE | G_PARAM_WRITABLE));
signals[INSERT_TEXT] =
gtk_signal_new ("insert_text",
GTK_RUN_LAST,
......@@ -675,6 +687,10 @@ static void gtk_entry_set_property (GObject *object,
gtk_entry_set_invisible_char (entry, g_value_get_int (value));
break;
case PROP_ACTIVATES_DEFAULT:
gtk_entry_set_activates_default (entry, g_value_get_boolean (value));
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
......@@ -708,6 +724,9 @@ static void gtk_entry_get_property (GObject *object,
case PROP_INVISIBLE_CHAR:
g_value_set_int (value, entry->invisible_char);
break;
case PROP_ACTIVATES_DEFAULT:
g_value_set_boolean (value, entry->activates_default);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
......@@ -922,13 +941,95 @@ gtk_entry_size_request (GtkWidget *widget,
yborder * 2);
}
static void
get_borders (GtkEntry *entry,
gint *xborder,
gint *yborder)
{
GtkWidget *widget;
widget = GTK_WIDGET (entry);
if (entry->has_frame)
{
if (xborder)
*xborder = widget->style->xthickness;
if (yborder)
*yborder = widget->style->ythickness;
}
else
{
/* 1 pixel for focus rect */
if (xborder)
*xborder = 1;
if (yborder)
*yborder = 1;
}
}
static void
get_text_area_size (GtkEntry *entry,
gint *x,
gint *y,
gint *width,
gint *height)
{
gint xborder, yborder;
GtkRequisition requisition;
GtkWidget *widget;
widget = GTK_WIDGET (entry);
gtk_widget_get_child_requisition (widget, &requisition);
get_borders (entry, &xborder, &yborder);
if (x)
*x = xborder;
if (y)
*y = yborder;
if (width)
*width = GTK_WIDGET (entry)->allocation.width - xborder * 2;
if (height)
*height = requisition.height - yborder * 2;
}
static void
get_widget_window_size (GtkEntry *entry,
gint *x,
gint *y,
gint *width,
gint *height)
{
GtkRequisition requisition;
GtkWidget *widget;
widget = GTK_WIDGET (entry);
gtk_widget_get_child_requisition (widget, &requisition);
if (x)
*x = widget->allocation.x;
if (y)
*y = widget->allocation.y + (widget->allocation.height - requisition.height) / 2;
if (width)
*width = widget->allocation.width;
if (height)
*height = requisition.height;
}
static void
gtk_entry_size_allocate (GtkWidget *widget,
GtkAllocation *allocation)
{
GtkEntry *entry;
GtkEditable *editable;
gint xborder, yborder;
g_return_if_fail (widget != NULL);
g_return_if_fail (GTK_IS_ENTRY (widget));
......@@ -937,18 +1038,6 @@ gtk_entry_size_allocate (GtkWidget *widget,
widget->allocation = *allocation;
entry = GTK_ENTRY (widget);
editable = GTK_EDITABLE (widget);
if (entry->has_frame)
{
xborder = widget->style->xthickness;
yborder = widget->style->ythickness;
}
else
{