[Bug 62894] Re: Strange behavior while moving maximized window (xinerama)

Christof Krüger ubuntu at pop2wap.net
Sun Oct 1 01:45:56 UTC 2006


Hi Sebastien,

I've looked into the source code of metacity and could find the crucial
lines. I've atteched a diff. This is my very first patch, so please
forgive me if there's anything wrong with it.

The problem did not only occur when dragging horizontally starting on
the right monitor without "shaking loose" the windows first. It also
occurs when first "shaking loose", then moving to the left and
reattaching with the cursor on the left monitor but with the window-
center on the right monitor.

Metacity first sets  the coordinates (window->saved_rect) to the top
left corner of the monitor and unmaximizes the grabbed window. Then, it
is maximizes it again. At this point window->user_rect is used as
reference to which xinerama workspace the window belongs. Therefore, the
window is maximized on the wrong monitor. When dragging the window
further the procedure is repeated: restoring the window to the left
monitor top left and immediately maximizing to the wrong monitor
yielding the weird window "jumping".

The patch is a two-liner: The window->save_rect coordinates are also
written to window->user_rect which is legitimate since it is a user
requested moving operation. With that the window is maximized to the
correct xinerama workspace.

What are the right steps to fix the bug upstream, too?

** Attachment added: "Patch fixing strange behaviour when moving maximized windows"
   http://librarian.launchpad.net/4565558/007_moving_maximized_windows.patch

-- 
Strange behavior while moving maximized window (xinerama)
https://launchpad.net/bugs/62894




More information about the desktop-bugs mailing list