Vladimir Sedach | 5 Oct 2011 05:31
Picon
Gravatar

[STUMP] Some patches to remove implementation-dependent code

I took a look at the stumpwm source code, and found some
implementation dependencies I thought didn't really belong there (in
particular with regards to CLISP). I also really dislike the
workarounds file - that crap just tends to pile up. Once a fix has
been made upstream it doesn't make sense to keep supporting old
versions.

Let me know what you guys think of these.

Vladimir
Attachment (0003-Got-rid-of-workarounds-file.patch): application/octet-stream, 6629 bytes
_______________________________________________
Stumpwm-devel mailing list
Stumpwm-devel <at> nongnu.org
https://lists.nongnu.org/mailman/listinfo/stumpwm-devel
Tomas Zellerin | 9 Oct 2011 11:28
Picon

[STUMP] *root-click-hook*

Hi,

Is *root-click-hook* still supported? It appears to be still defined
and referenced in the info file, but it does not seem to work for me
any longer, and quick grep through current git sources did not reveal
any call to it.

It appears to get lost in commit 3ba1, when  group-button-press was
factored out, but no reason for omitting is stated.

Best regards,

Tomas
Burton Samograd | 18 Oct 2011 17:32
Favicon

[STUMP] Have focus follow move-window

Hello,

I was wondering if there was a way to force the focus to follow a
move-window.  I have my mouse focus policy set to :sloppy, so I'm not
sure if that is causing me to lose window focus when I do a move-window.

Thanks.

--
Burton Samograd
Scott Jaderholm | 20 Oct 2011 00:28
Picon
Gravatar

Re: [STUMP] Have focus follow move-window

I think you're right that :sloppy is causing your problem, since in my .stumpwmrc I have:

      ;; :sloppy is broken I think, causes windows to lose focus when moving
      *mouse-focus-policy* :click ; click, ignore, sloppy

Scott


On Tue, Oct 18, 2011 at 11:32 AM, Burton Samograd <bsamograd <at> interalia.com> wrote:
Hello,

I was wondering if there was a way to force the focus to follow a
move-window.  I have my mouse focus policy set to :sloppy, so I'm not
sure if that is causing me to lose window focus when I do a move-window.

Thanks.

--
Burton Samograd


_______________________________________________
Stumpwm-devel mailing list
Stumpwm-devel <at> nongnu.org
https://lists.nongnu.org/mailman/listinfo/stumpwm-devel

_______________________________________________
Stumpwm-devel mailing list
Stumpwm-devel <at> nongnu.org
https://lists.nongnu.org/mailman/listinfo/stumpwm-devel
Michael Raskin | 20 Oct 2011 07:13
Picon
Favicon

[STUMP] Have focus follow move-window

>I was wondering if there was a way to force the focus to follow a
>move-window.  I have my mouse focus policy set to :sloppy, so I'm not
>sure if that is causing me to lose window focus when I do a move-window.

My StumpWM ignores mouse for focus and focus follows move-window.

My understanding of sloppy is "focus is where the mouse is", so I cannot
see why move-window could not lead to focus loss - the window is now not
where the mouse is, after all.

You can define a command that does a move-window and then does ratwarp
to the center of the target frame in your StumpWM rc file. 
Burton Samograd | 20 Oct 2011 17:27
Favicon

Re: [STUMP] Have focus follow move-window

"Michael Raskin" <38a938c2 <at> rambler.ru> writes:

>>I was wondering if there was a way to force the focus to follow a
>>move-window.  I have my mouse focus policy set to :sloppy, so I'm not
>>sure if that is causing me to lose window focus when I do a
>> move-window.
>
> My StumpWM ignores mouse for focus and focus follows move-window.
>
> My understanding of sloppy is "focus is where the mouse is", so I cannot
> see why move-window could not lead to focus loss - the window is now not
> where the mouse is, after all.
>
> You can define a command that does a move-window and then does ratwarp
> to the center of the target frame in your StumpWM rc file. 

I modified move-focus-and-or-window in tile-group.lisp to be as follows:

(defun move-focus-and-or-window (dir &optional win-p)
  (declare (type (member :up :down :left :right) dir))
  (let* ((group (current-group))
         (new-frame (neighbour dir (tile-group-current-frame group) (group-frames group)))
         (window (current-window)))
    (when new-frame
      (if (and win-p window)
          (progn
            (pull-window window new-frame)
            (when (eq *mouse-focus-policy* :sloppy)
                (progn
                  (focus-frame group new-frame)
                  (warp-pointer (window-screen window)
                                (+ 8 (frame-x new-frame))
                                (+ 8 (frame-y new-frame))))))
          (focus-frame group new-frame)))))

Seems to work for me now. Thanks for the advice.

--
Burton Samograd
Michael Raskin | 20 Oct 2011 18:20
Picon
Favicon

Re: [STUMP] Have focus follow move-window

<20111020050700.25B921A25013 <at> maile.rambler.ru>)
Mime-Version: 1.0
Content-type: text/plain; charset="UTF-8"

>>>I was wondering if there was a way to force the focus to follow a
>>>move-window.  I have my mouse focus policy set to :sloppy, so I'm not
>>>sure if that is causing me to lose window focus when I do a
>>> move-window.
>>
>> My StumpWM ignores mouse for focus and focus follows move-window.
>>
>> My understanding of sloppy is "focus is where the mouse is", so I cannot
>> see why move-window could not lead to focus loss - the window is now not
>> where the mouse is, after all.
>>
>> You can define a command that does a move-window and then does ratwarp
>> to the center of the target frame in your StumpWM rc file. 
>
>I modified move-focus-and-or-window in tile-group.lisp to be as follows:
>
>(defun move-focus-and-or-window (dir &optional win-p)
>  (declare (type (member :up :down :left :right) dir))
>  (let* ((group (current-group))
>         (new-frame (neighbour dir (tile-group-current-frame group) (group-frames group)))
>         (window (current-window)))
>    (when new-frame
>      (if (and win-p window)
>          (progn
>            (pull-window window new-frame)
>            (when (eq *mouse-focus-policy* :sloppy)
>                (progn
>                  (focus-frame group new-frame)
>                  (warp-pointer (window-screen window)
>                                (+ 8 (frame-x new-frame))
>                                (+ 8 (frame-y new-frame))))))
>          (focus-frame group new-frame)))))
>
>Seems to work for me now. Thanks for the advice.

I recommend putting this into .stumpwmrc - so you will not lose it 
across StumpWM updates. Whether it is a good change for mainline, I am
not sure...
Burton Samograd | 20 Oct 2011 18:45
Favicon

Re: [STUMP] Have focus follow move-window

"Michael Raskin" <38a938c2 <at> rambler.ru> writes:
> I recommend putting this into .stumpwmrc - so you will not lose it 
> across StumpWM updates. Whether it is a good change for mainline, I am
> not sure...

Yup, I put it into my .stumpwmrc.  As for mainline, I would have found
it a useful default behaviour and I'm sure that I'm not the only one
that uses :sloppy.

--
Burton Samograd
Erik Winkels | 20 Oct 2011 18:59
Picon
Picon
Favicon
Gravatar

Re: [STUMP] Have focus follow move-window

On 20 okt. 2011, at 18:45, Burton Samograd <bsamograd <at> interalia.com> wrote:

> "Michael Raskin" <38a938c2 <at> rambler.ru> writes:
>> I recommend putting this into .stumpwmrc - so you will not lose it 
>> across StumpWM updates. Whether it is a good change for mainline, I am
>> not sure...
> 
> Yup, I put it into my .stumpwmrc.  As for mainline, I would have found
> it a useful default behaviour and I'm sure that I'm not the only one
> that uses :sloppy.

Yup, I ran into the same problem today and I'm using :sloppy as well.

When using move-{up,down,left,right} for more than one step one has to refocus the moved window to be able
to move it again.

So thanks for that patch!
Michael Raskin | 20 Oct 2011 20:50
Picon
Favicon

Re: [STUMP] Have focus follow move-window

<20111020161317.47C538440F <at> maild.rambler.ru>)
Mime-Version: 1.0
Content-type: text/plain; charset="UTF-8"

>"Michael Raskin" <38a938c2 <at> rambler.ru> writes:
>> I recommend putting this into .stumpwmrc - so you will not lose it 
>> across StumpWM updates. Whether it is a good change for mainline, I am
>> not sure...
>
>Yup, I put it into my .stumpwmrc.  As for mainline, I would have found
>it a useful default behaviour and I'm sure that I'm not the only one
>that uses :sloppy.

People who use :sloppy, please say what should move-focus do.

Where should it put ratcursor? I would see the point of window center,
top-left corner and the middle of the top side. I guess that to make
this configurable (if needed), we'd need to know what would different
people like.

Gmane