gtk+ r22524 - in trunk: . gtk
- From: matthiasc svn gnome org
- To: svn-commits-list gnome org
- Subject: gtk+ r22524 - in trunk: . gtk
- Date: Wed, 11 Mar 2009 23:27:07 +0000 (UTC)
Author: matthiasc
Date: Wed Mar 11 23:27:07 2009
New Revision: 22524
URL: http://svn.gnome.org/viewvc/gtk+?rev=22524&view=rev
Log:
Fix problems with window positioning
Modified:
trunk/ChangeLog
trunk/gtk/gtkentry.c
Modified: trunk/gtk/gtkentry.c
==============================================================================
--- trunk/gtk/gtkentry.c (original)
+++ trunk/gtk/gtkentry.c Wed Mar 11 23:27:07 2009
@@ -2265,6 +2265,9 @@
get_text_area_size (entry, &x, &y, &width, &height);
+ if (GTK_WIDGET_HAS_FOCUS (entry) && !priv->interior_focus)
+ y += priv->focus_width;
+
primary->y = y;
primary->height = height;
primary->width = get_icon_width (entry, GTK_ENTRY_ICON_PRIMARY);
@@ -2784,7 +2787,6 @@
static void
place_windows (GtkEntry *entry)
-
{
GtkEntryPrivate *priv = GTK_ENTRY_GET_PRIVATE (entry);
gint x, y, width, height;
@@ -2793,9 +2795,11 @@
EntryIconInfo *icon_info = NULL;
get_text_area_size (entry, &x, &y, &width, &height);
-
get_icon_allocations (entry, &primary, &secondary);
+ if (GTK_WIDGET_HAS_FOCUS (entry) && !priv->interior_focus)
+ y += priv->focus_width;
+
if (gtk_widget_get_direction (GTK_WIDGET (entry)) == GTK_TEXT_DIR_RTL)
x += secondary.width;
else
@@ -2803,7 +2807,7 @@
width -= primary.width + secondary.width;
if ((icon_info = priv->icons[GTK_ENTRY_ICON_PRIMARY]) != NULL)
- gdk_window_move_resize (icon_info->window,
+ gdk_window_move_resize (icon_info->window,
primary.x, primary.y,
primary.width, primary.height);
@@ -2949,7 +2953,7 @@
GtkEntryCompletion* completion;
get_widget_window_size (entry, &x, &y, &width, &height);
- gdk_window_move_resize (widget->window, x, y, width, height);
+ gdk_window_move_resize (widget->window, x, y, width, height);
place_windows (entry);
gtk_entry_recompute (entry);
@@ -4010,7 +4014,7 @@
GtkEntry *entry = GTK_ENTRY (widget);
GtkEntryCompletion *completion;
GdkKeymap *keymap;
-
+
gtk_widget_queue_draw (widget);
keymap = gdk_keymap_get_for_display (gtk_widget_get_display (widget));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]