aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRichard M. Stallman1998-08-05 01:42:24 +0000
committerRichard M. Stallman1998-08-05 01:42:24 +0000
commit2745e6c4cd6728e42a524d489a3ba87a67068523 (patch)
tree18b5a30831cf563619322fc8eb1845bb9c480af4 /src
parent61d7e1dc5bf3b2686156f8b35609a8105f115f8f (diff)
downloademacs-2745e6c4cd6728e42a524d489a3ba87a67068523.tar.gz
emacs-2745e6c4cd6728e42a524d489a3ba87a67068523.zip
(x_list_fonts): Call XFreeFont after the new call to XLoadQueryFont.
(fast_find_position): Handle case where position is before an invisible character, thus not actually listed in charstarts. (x_make_frame_visible): Use XGetGeometry to see if position has been changed by the window manager. Use FRAME_OUTER_WINDOW.
Diffstat (limited to 'src')
-rw-r--r--src/xterm.c31
1 files changed, 22 insertions, 9 deletions
diff --git a/src/xterm.c b/src/xterm.c
index 1668a27089b..5ae37327d7f 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -2609,7 +2609,7 @@ fast_find_position (window, pos, columnp, rowp)
2609 else if (charstarts[left + i] > pos) 2609 else if (charstarts[left + i] > pos)
2610 break; 2610 break;
2611 else if (charstarts[left + i] > 0) 2611 else if (charstarts[left + i] > 0)
2612 lastcol = left + i; 2612 lastcol = left + i + 1;
2613 } 2613 }
2614 2614
2615 /* If we're looking for the end of the buffer, 2615 /* If we're looking for the end of the buffer,
@@ -5834,7 +5834,7 @@ x_make_frame_visible (f)
5834 /* This must come after we set COUNT. */ 5834 /* This must come after we set COUNT. */
5835 UNBLOCK_INPUT; 5835 UNBLOCK_INPUT;
5836 5836
5837 /* Arriving X events are processed here. */ 5837 /* We unblock here so that arriving X events are processed. */
5838 5838
5839 /* Now move the window back to where it was "supposed to be". 5839 /* Now move the window back to where it was "supposed to be".
5840 But don't do it if the gravity is negative. 5840 But don't do it if the gravity is negative.
@@ -5849,15 +5849,27 @@ x_make_frame_visible (f)
5849 && f->output_data.x->win_gravity == NorthWestGravity 5849 && f->output_data.x->win_gravity == NorthWestGravity
5850 && previously_visible) 5850 && previously_visible)
5851 { 5851 {
5852 Drawable rootw;
5853 int x, y;
5854 unsigned int width, height, border, depth;
5855
5852 BLOCK_INPUT; 5856 BLOCK_INPUT;
5853 5857
5854#ifdef USE_X_TOOLKIT 5858 /* On some window managers (Such as FVWM) moving an existing window,
5855 XMoveWindow (FRAME_X_DISPLAY (f), XtWindow (f->output_data.x->widget), 5859 even to the same place, causes the window manager to introduce
5856 original_left, original_top); 5860 an offset. This can cause the window to move to an unexpected
5857#else /* not USE_X_TOOLKIT */ 5861 location. Check the geometry (A little slow here) and then verify
5858 XMoveWindow (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), 5862 that the window is in the right place. If the window is not in
5859 original_left, original_top); 5863 the right place, move it there, and take the potential window
5860#endif /* not USE_X_TOOLKIT */ 5864 manager hit. */
5865
5866 XGetGeometry (FRAME_X_DISPLAY (f), FRAME_OUTER_WINDOW (f),
5867 &rootw, &x, &y, &width, &height, &border, &depth);
5868
5869 if (original_left != x || original_top != y)
5870 XMoveWindow (FRAME_X_DISPLAY (f), FRAME_OUTER_WINDOW (f),
5871 original_left, original_top);
5872
5861 UNBLOCK_INPUT; 5873 UNBLOCK_INPUT;
5862 } 5874 }
5863 5875
@@ -6485,6 +6497,7 @@ x_list_fonts (f, pattern, size, maxnames)
6485 } 6497 }
6486 else 6498 else
6487 try_XLoadQueryFont = 0; 6499 try_XLoadQueryFont = 0;
6500 XFreeFont (font);
6488 } 6501 }
6489 6502
6490 if (!try_XLoadQueryFont) 6503 if (!try_XLoadQueryFont)