mirror of
https://github.com/brl/mutter.git
synced 2025-08-04 23:54:40 +00:00
track the last_xor_rect separately from the current window size, and then
2004-08-18 Havoc Pennington <hp@redhat.com> * src/display.h (struct _MetaDisplay): track the last_xor_rect separately from the current window size, and then use that to paint the wireframe including the frame, and taking into account shaded windows. * src/window.c (meta_window_get_xor_rect): new function to compute the xor rect; it is not really 100% right, because it uses the frame dimensions from the window at the start of the move/resize. But probably won't break in practice.
This commit is contained in:

committed by
Havoc Pennington

parent
e81b5978b0
commit
06a58f43c0
@@ -3136,10 +3136,8 @@ meta_display_begin_grab_op (MetaDisplay *display,
|
||||
|
||||
if (display->grab_wireframe_active)
|
||||
{
|
||||
/* FIXME we should really display the outer frame rect,
|
||||
* but that complicates all the move/resize code since
|
||||
* it works in terms of window rect.
|
||||
*/
|
||||
MetaRectangle xor_rect;
|
||||
|
||||
display->grab_wireframe_rect = window->rect;
|
||||
if (window->frame)
|
||||
{
|
||||
@@ -3148,8 +3146,13 @@ meta_display_begin_grab_op (MetaDisplay *display,
|
||||
}
|
||||
|
||||
meta_window_calc_showing (display->grab_window);
|
||||
|
||||
meta_window_get_xor_rect (window, &display->grab_wireframe_rect,
|
||||
&xor_rect);
|
||||
|
||||
meta_effects_begin_wireframe (display->grab_window->screen,
|
||||
&display->grab_wireframe_rect);
|
||||
&xor_rect);
|
||||
display->grab_wireframe_last_xor_rect = xor_rect;
|
||||
}
|
||||
|
||||
#ifdef HAVE_XSYNC
|
||||
@@ -3312,7 +3315,7 @@ meta_display_end_grab_op (MetaDisplay *display,
|
||||
{
|
||||
display->grab_wireframe_active = FALSE;
|
||||
meta_effects_end_wireframe (display->grab_window->screen,
|
||||
&display->grab_wireframe_rect);
|
||||
&display->grab_wireframe_last_xor_rect);
|
||||
if (!display->grab_was_cancelled)
|
||||
meta_window_move_resize (display->grab_window,
|
||||
TRUE,
|
||||
|
Reference in New Issue
Block a user