On Mon, 29 Aug 2005, Mikhael Goikhman wrote:
On 29 Aug 2005 22:55:43 +0200, Viktor Griph wrote:
This patch makes placement of windows using any button possible. The
button used to place the window is stored, and can be checked for with the
new window condition PlacedByButton.
I wonder what are real life applications of this feature. Personally I
don't find ManualPlacement very useful, and find using Move plus button 3
to flag a window forever (actually until it is moved again and canceled
using button 2) quite tricky. I think there are better (explicit) ways to
flag a window, but I would like to hear about a different experience.
Regards,
Mikhael.
I'm not sure about the usefulness about the flagging. The main reason for
the patch is the ability to complete moves with any button, which was
something my brother have been asking for all summer, since he got his new
mouse. The reason that I also added the condition was manly for
completness. But as I said I still need a good way to define what
button(s) that should cancel the placement. Of cource I could skip the
condition, and go back to only having PlacedByButton3, but I would stil
need a way to allow placement by higher buttons. I actually find the
PlacedByButton3 rather useless, and would mush more like button 3 to
cancel the move (something I'll be able to do with my patch once it's
finished).
Right now I'm thinking of adding a context P for Placement and only allow
Mouse bindings, with no modifiers. What I'm thinking of in ways of
implementations is to store a mask of buttons, eiher allowed to place the
window, and just abort placment if another button is used. That would make
it possible to have any number of buttons useable to finish/abort movment.
Mouse 0 P A PlaceWindow
Mouse 3 P A -
would then allow placement by any button except button 3, which probably
would be how I would use it.
What would be really cool should be to allow more complex bindings, but
I'm not sure I would be able to code that. At least not easy, but the
ability to bind functions to certain placement buttons would be more
useful than any permanent flagging of the window. Right now I've only
found use of the PlacedByButton conditions directly after a move as in:
Mouse 1 T A Function MoveWindow
DestroyFunc MoveWindow
AddToFunc MoveWindow
+ C Move
+ C TestRc (Error) Break
+ C ThisWindow (PlacedByButton 5) WindowShade off
+ C TestRc (Match) Maximize on 0 100
+ C ThisWindow (PlacedByButton 4) WindowShade on
+ M Move
+ H Move
Which will maximize a window vertically if I place it by rolling the
scroll wheel down, and shade it if I place it by rolling the scroll wheel
up.
/Viktor