Use utility functions to convert between frame and client rectangles

There are extensive places in the code where we convert between the client
rectangle and the frame rectangle. Instead of manually doing it use
new helper functions on MetaWindow and the existing meta_window_get_outer_rect().

This fixes a number of bugs where the computation was being done incorrectly,
most of these bugs are with the recently added custom frame extents, but
some relate to invisible borders or even simply to confusion between the
window and frame rectangle.

Switch the placement code to place the frame rectangle rather
than the client window - this simplifies things considerably.

https://bugzilla.gnome.org/show_bug.cgi?id=707194
This commit is contained in:
Owen W. Taylor
2013-11-15 16:11:20 -05:00
parent a1087c3f30
commit f36a627330
6 changed files with 222 additions and 211 deletions

View File

@ -542,6 +542,8 @@ meta_window_is_skip_taskbar
meta_window_get_rect
meta_window_get_input_rect
meta_window_get_outer_rect
meta_window_client_rect_to_frame_rect
meta_window_frame_rect_to_client_rect
meta_window_get_screen
meta_window_get_display
meta_window_get_xwindow