aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJan Djärv2010-04-13 17:16:42 +0200
committerJan Djärv2010-04-13 17:16:42 +0200
commit92848133b2c17d028b2172b6f3ef43e6c1a1370c (patch)
tree9f699bc4cf352b188dad6a09086b99f8d56b4536 /src
parent4bef8d2634d33d234c91be7b95d9c9fb8cfc7a0c (diff)
downloademacs-92848133b2c17d028b2172b6f3ef43e6c1a1370c.tar.gz
emacs-92848133b2c17d028b2172b6f3ef43e6c1a1370c.zip
Fix so top -10 and left -10 in frame parameters work.
* gtkutil.c (xg_set_geometry): Set geometry for PPosition also. (x_wm_set_size_hint): Dont set position flags, gtk_window_parse_geometry does that.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog4
-rw-r--r--src/gtkutil.c19
2 files changed, 6 insertions, 17 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 4925c749101..a8e8aa7ddfb 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,9 @@
12010-04-13 Jan Djärv <jan.h.d@swipnet.se> 12010-04-13 Jan Djärv <jan.h.d@swipnet.se>
2 2
3 * gtkutil.c (xg_set_geometry): Set geometry for PPosition also.
4 (x_wm_set_size_hint): Dont set position flags, gtk_window_parse_geometry
5 does that.
6
3 * xfns.c (Fx_create_frame, x_create_tip_frame): Set default border width 7 * xfns.c (Fx_create_frame, x_create_tip_frame): Set default border width
4 to zero. 8 to zero.
5 9
diff --git a/src/gtkutil.c b/src/gtkutil.c
index 2764382e8a1..25da0baec79 100644
--- a/src/gtkutil.c
+++ b/src/gtkutil.c
@@ -529,7 +529,7 @@ static void
529xg_set_geometry (f) 529xg_set_geometry (f)
530 FRAME_PTR f; 530 FRAME_PTR f;
531{ 531{
532 if (f->size_hint_flags & USPosition) 532 if (f->size_hint_flags & (USPosition | PPosition))
533 { 533 {
534 int left = f->left_pos; 534 int left = f->left_pos;
535 int xneg = f->size_hint_flags & XNegative; 535 int xneg = f->size_hint_flags & XNegative;
@@ -542,9 +542,7 @@ xg_set_geometry (f)
542 if (yneg) 542 if (yneg)
543 top = -top; 543 top = -top;
544 544
545 sprintf (geom_str, "=%dx%d%c%d%c%d", 545 sprintf (geom_str, "%c%d%c%d",
546 FRAME_PIXEL_WIDTH (f),
547 FRAME_TOTAL_PIXEL_HEIGHT (f),
548 (xneg ? '-' : '+'), left, 546 (xneg ? '-' : '+'), left,
549 (yneg ? '-' : '+'), top); 547 (yneg ? '-' : '+'), top);
550 548
@@ -552,9 +550,6 @@ xg_set_geometry (f)
552 geom_str)) 550 geom_str))
553 fprintf (stderr, "Failed to parse: '%s'\n", geom_str); 551 fprintf (stderr, "Failed to parse: '%s'\n", geom_str);
554 } 552 }
555 else if (f->size_hint_flags & PPosition)
556 gtk_window_move (GTK_WINDOW (FRAME_GTK_OUTER_WIDGET (f)),
557 f->left_pos, f->top_pos);
558} 553}
559 554
560/* Clear under internal border if any. As we use a mix of Gtk+ and X calls 555/* Clear under internal border if any. As we use a mix of Gtk+ and X calls
@@ -956,16 +951,6 @@ x_wm_set_size_hint (f, flags, user_position)
956 else if (win_gravity == StaticGravity) 951 else if (win_gravity == StaticGravity)
957 size_hints.win_gravity = GDK_GRAVITY_STATIC; 952 size_hints.win_gravity = GDK_GRAVITY_STATIC;
958 953
959 if (flags & PPosition) hint_flags |= GDK_HINT_POS;
960 if (flags & USPosition) hint_flags |= GDK_HINT_USER_POS;
961 if (flags & USSize) hint_flags |= GDK_HINT_USER_SIZE;
962
963 if (user_position)
964 {
965 hint_flags &= ~GDK_HINT_POS;
966 hint_flags |= GDK_HINT_USER_POS;
967 }
968
969 if (hint_flags != f->output_data.x->hint_flags 954 if (hint_flags != f->output_data.x->hint_flags
970 || memcmp (&size_hints, 955 || memcmp (&size_hints,
971 &f->output_data.x->size_hints, 956 &f->output_data.x->size_hints,