On 31 Aug 2005 23:19:48 +0200, Viktor Griph wrote: > > On Tue, 30 Aug 2005, Viktor Griph wrote: > > >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. > >> > >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.
I see, but still I think this is a quite hacky way of achieving it. Also, with the current logic, if you once placed a window using button 3, it will still have PlacedByButton3 flag on set even if you move and place it using button 1 the next time. At least it should be consistent and reset the flag(s) after every Move (either successful or canceled). > I had some time tosday and added the context "P" for Placement that works > just like the menu context, and allows the actions "PlaceWindow" or "-". > > The default is set equivalent to > Mouse 0 P N PlaceWindow > Mouse 2 P N - > > which is how the manpage stated that move worked before. (except that it > didn't say anything about buttons>3, which now work). > > I've also changed so that the PlacedByButton flags don't survive a > canceled placement, or the only use I've found for them would not be that > useful. I also put in it as an example in the man page. This is not enough, To emulate the current logic you should also add: Mouse 1 P N CancelPlacement Mouse 2 P N CancelPlacement I.e. if you started the Move using button 1, then button 2 cancels it and vice versa. Since you can't press button 1 again while dragging using button 1, these binding would be ok although not immediately intuitive. Regards, Mikhael.