Mercurial > emacs
comparison src/xterm.c @ 90066:fb79180b618d
Revision: miles@gnu.org--gnu-2004/emacs--unicode--0--patch-78
Merge from emacs--cvs-trunk--0
Patches applied:
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-719
- miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-732
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-733
Update from CVS: man/calc.texi: Fix some TeX definitions.
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-734
Merge from gnus--rel--5.10
* miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-75
Merge from emacs--cvs-trunk--0
* miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-76
- miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-77
Update from CVS
author | Miles Bader <miles@gnu.org> |
---|---|
date | Tue, 14 Dec 2004 07:34:55 +0000 |
parents | f2ebccfa87d4 75cac0943699 |
children | eac554634bfa |
comparison
equal
deleted
inserted
replaced
90065:c26eb15cd14a | 90066:fb79180b618d |
---|---|
8169 /* We have nothing to do if the current position | 8169 /* We have nothing to do if the current position |
8170 is already for the top-left corner. */ | 8170 is already for the top-left corner. */ |
8171 if (! ((flags & XNegative) || (flags & YNegative))) | 8171 if (! ((flags & XNegative) || (flags & YNegative))) |
8172 return; | 8172 return; |
8173 | 8173 |
8174 /* Find the offsets of the outside upper-left corner of | |
8175 the inner window, with respect to the outer window. | |
8176 But do this only if we will need the results. */ | |
8177 if (f->output_data.x->parent_desc != FRAME_X_DISPLAY_INFO (f)->root_window) | |
8178 /* This is to get *_pixels_outer_diff. */ | |
8179 x_real_positions (f, &win_x, &win_y); | |
8180 | |
8181 /* Treat negative positions as relative to the leftmost bottommost | 8174 /* Treat negative positions as relative to the leftmost bottommost |
8182 position that fits on the screen. */ | 8175 position that fits on the screen. */ |
8183 if (flags & XNegative) | 8176 if (flags & XNegative) |
8184 f->left_pos = (FRAME_X_DISPLAY_INFO (f)->width | 8177 f->left_pos = (FRAME_X_DISPLAY_INFO (f)->width |
8185 - 2 * FRAME_X_OUTPUT (f)->x_pixels_outer_diff | 8178 - FRAME_PIXEL_WIDTH (f) + f->left_pos); |
8186 - FRAME_PIXEL_WIDTH (f) | |
8187 + f->left_pos); | |
8188 | 8179 |
8189 { | 8180 { |
8190 int height = FRAME_PIXEL_HEIGHT (f); | 8181 int height = FRAME_PIXEL_HEIGHT (f); |
8191 | 8182 |
8192 #if defined USE_X_TOOLKIT && defined USE_MOTIF | 8183 #if defined USE_X_TOOLKIT && defined USE_MOTIF |
8204 | 8195 |
8205 XtVaGetValues (f->output_data.x->column_widget, XtNheight, &height, NULL); | 8196 XtVaGetValues (f->output_data.x->column_widget, XtNheight, &height, NULL); |
8206 #endif | 8197 #endif |
8207 | 8198 |
8208 if (flags & YNegative) | 8199 if (flags & YNegative) |
8209 f->top_pos = (FRAME_X_DISPLAY_INFO (f)->height | 8200 f->top_pos = (FRAME_X_DISPLAY_INFO (f)->height - height + f->top_pos); |
8210 - FRAME_X_OUTPUT (f)->y_pixels_outer_diff | |
8211 | |
8212 /* Assume the window manager decorations are the same size on | |
8213 three sides, i.e. left, right and bottom. This is to | |
8214 compensate for the bottom part. */ | |
8215 - FRAME_X_OUTPUT (f)->x_pixels_outer_diff | |
8216 - height | |
8217 + f->top_pos); | |
8218 } | 8201 } |
8219 | 8202 |
8220 /* The left_pos and top_pos | 8203 /* The left_pos and top_pos |
8221 are now relative to the top and left screen edges, | 8204 are now relative to the top and left screen edges, |
8222 so the flags should correspond. */ | 8205 so the flags should correspond. */ |
8328 { | 8311 { |
8329 FRAME_X_DISPLAY_INFO (f)->wm_type = X_WMTYPE_A; | 8312 FRAME_X_DISPLAY_INFO (f)->wm_type = X_WMTYPE_A; |
8330 FRAME_X_OUTPUT (f)->move_offset_left = expect_left - f->left_pos; | 8313 FRAME_X_OUTPUT (f)->move_offset_left = expect_left - f->left_pos; |
8331 FRAME_X_OUTPUT (f)->move_offset_top = expect_top - f->top_pos; | 8314 FRAME_X_OUTPUT (f)->move_offset_top = expect_top - f->top_pos; |
8332 | 8315 |
8333 x_set_offset (f, expect_left, expect_top, 1); | 8316 f->left_pos = expect_left; |
8317 f->top_pos = expect_top; | |
8318 x_set_offset (f, expect_left, expect_top, 0); | |
8334 } | 8319 } |
8335 else if (FRAME_X_DISPLAY_INFO (f)->wm_type == X_WMTYPE_UNKNOWN) | 8320 else if (FRAME_X_DISPLAY_INFO (f)->wm_type == X_WMTYPE_UNKNOWN) |
8336 FRAME_X_DISPLAY_INFO (f)->wm_type = X_WMTYPE_B; | 8321 FRAME_X_DISPLAY_INFO (f)->wm_type = X_WMTYPE_B; |
8337 | 8322 |
8338 /* Just do this once */ | 8323 /* Just do this once */ |