[haiku-development] app_server: Resizing Windows from other sides/corners

  • From: Ryan Leavengood <leavengood@xxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Mon, 23 Nov 2009 16:26:26 -0500

As part of trying to implement http://dev.haiku-os.org/ticket/4493 I
discovered that the app_server has an assumption that all resizing is
done from the lower right. This makes sense since in general that is
where the resize region is.

Of course to implement ticket #4493 properly there needs to be support
for resizing from other corners and sides, which in some cases will
require moving the location of the window while proportionally
increasing the size (leaving the opposite corner or side in the same
position.)

Since this is adding some complexity to the app_server I figured I'd
get some input:

Is there any major opposition to this idea? I figure it is useful in
general so that it is possible to implement other window decorators
which have border resizing on by default.

Any suggestions on implementation? My general thought was to introduce
an enum ResizeCorner that represents from what corner the resizing
should be done from. This can be passed into Desktop::ResizeWindowBy.
This will do most of the work in determining where to move the window
(or not) based on the resize corner. For example if the resize corner
is the top left then the window will be moved up and to the left while
also being resized. I'm sure there are more subtle details but that is
the plan in general. Any feedback is appreciated.

-- 
Regards,
Ryan

Other related posts: