On Sun 13.Sep'09 at 22:28:40 +0200, Nicolas Bonifas wrote: > I changed the way this patch works: instead of saving the screen_ptr in the > old_geometry struct, wUnmaximizeWindow compares the current head for the > maximized window and the head for the saved coordinates, using > wGetHeadForWindow and wGetHeadForRect from xinerama.c. > This avoids modifying code outside of wUnmaximizeWindow.
If it works, great. But I don't yet see how it will. > - x = wwin->old_geometry.x ? wwin->old_geometry.x : wwin->frame_x; > - y = wwin->old_geometry.y ? wwin->old_geometry.y : wwin->frame_y; > + old_geom_rect = wmkrect(wwin->old_geometry.x, wwin->old_geometry.y, > wwin->old_geometry.width, wwin->old_geometry.height); > + old_head = wGetHeadForRect(wwin->screen_ptr, old_geom_rect); > + same_head = (wGetHeadForWindow(wwin) == old_head); > + x = (wwin->old_geometry.x && same_head) ? wwin->old_geometry.x : > wwin->frame_x; > + y = (wwin->old_geometry.y && same_head) ? wwin->old_geometry.y : > wwin->frame_y; I don't understand how the origin of the number for 'x' and 'y' can matter if the window will go back to the other head or not. These variables after all don't remember where they came from, they are just ints. I pushed it to 'next' to ease Martin's life though. > Included in this patch is also a slight change in the definition of > find_Maximus_geometry, > for coherence with the rest of the code, and the removal of a > useless and commented part of code in xinerama.c (which makes wmaker smaller > ;-) ). Sorry for being boring here, but those are unrelated changes which deserve patches of their own. Because if the fix doesn't work, we still want to have these little cleanups. So in fact I separated your patch into 3. Take a look into 'next' and complain if I did it wrong :-) -- To unsubscribe, send mail to [email protected].
