Redo the whole window offsets and coordinate translation for X.
commit719fd9334634dfc91e145d0a7320387a8bb4b75f
authorJan D <jhd@f20.localdomain>
Wed, 25 Feb 2015 19:16:44 +0000 (25 20:16 +0100)
committerJan D <jhd@f20.localdomain>
Wed, 25 Feb 2015 19:16:44 +0000 (25 20:16 +0100)
treef8291b946d6c23dd60b564dda4ccae43a7a70c9a
parent0731a2e857f6d328a06a12d9d7540f41f3a8ae04
Redo the whole window offsets and coordinate translation for X.

* frame.h (struct frame): Remove x_pixels_diff, y_pixels_diff.

* w32fns.c (x_real_positions): Remove setting of x_pixels_diff,
y_pixels_diff.

* xfns.c (x_real_pos_and_offsets): New function, basically the code
from x_real_positions.
(x_real_positions): Call x_real_pos_and_offsets.
(x_relative_mouse_position): Use XTranslateCoordinates instead of
OUTER_TO_INNER_DIFF macros.
(Fx_frame_geometry): Get offsets with x_real_pos_and_offsets,
border from window attributes.  Adjust tool bar and menu widths.

* xmenu.c (create_and_show_popup_menu): Use XTranslateCoordinates
instead of OUTER_TO_INNER_DIFF macros.

* xterm.h (struct x_output): Remove x_pixels_outer_diff,
y_pixels_outer_diff, FRAME_OUTER_TO_INNER_DIFF_X,
FRAME_OUTER_TO_INNER_DIFF_Y. Declare x_real_pos_and_offsets.
src/ChangeLog
src/frame.h
src/w32fns.c
src/xfns.c
src/xmenu.c
src/xterm.h