You are not logged in.

#1 2019-11-01 13:19:51

brontosaurusrex
Middle Office
Registered: 2015-09-29
Posts: 2,038
Website

[SOLVED] Resize window with mouse right drag in titlebar

As seen in i3 where one can resize windows with right-mouse-draging in window title bar, trying something similar in openbox.

Trying to paste this into rc.xml

      <mousebind action="Drag" button="Right">
         <action name="Resize"/>
      </mousebind>

inside of

    <context name="Titlebar"> ... </context>

doesn't seem to yield any results. Any solutions?

Last edited by brontosaurusrex (2019-11-02 12:49:39)

Offline

#2 2019-11-01 20:20:03

damo
....moderator....
Registered: 2015-08-20
Posts: 6,036

Re: [SOLVED] Resize window with mouse right drag in titlebar

It may clash with other actions, which take priority? There is the default window Resize action ("A-Right") which resizes a window, but I guess you are looking for a quick one-handed method.

EDIT: it works for me hmm

      <mousebind button="Right" action="Drag">
        <action name="Resize"/>
      </mousebind>

You need to keep away from the middle area of the titlebar to get the resize action in both dimensions, otherwise it just works vertically.

Last edited by damo (2019-11-01 20:33:04)


Be Excellent to Each Other...
The Bunsenlabs Lithium Desktop » Here
FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt  «» BunsenLabs on DeviantArt

Offline

#3 2019-11-01 20:57:16

linux_user
Member
Registered: 2016-11-04
Posts: 459

Re: [SOLVED] Resize window with mouse right drag in titlebar

damo wrote:

There is the default window Resize action ("A-Right") which resizes a window,

Did you mean Alt+R?


"Blind faith to authority is the greatest enemy of truth."

Offline

#4 2019-11-01 20:59:50

damo
....moderator....
Registered: 2015-08-20
Posts: 6,036

Re: [SOLVED] Resize window with mouse right drag in titlebar

linux_user wrote:
damo wrote:

There is the default window Resize action ("A-Right") which resizes a window,

Did you mean Alt+R?

Yes, but in rc.xml it is written as "A-Right".


Be Excellent to Each Other...
The Bunsenlabs Lithium Desktop » Here
FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt  «» BunsenLabs on DeviantArt

Offline

#5 2019-11-01 22:36:37

PackRat
jgmenu user Numero Uno
Registered: 2015-10-02
Posts: 1,213

Re: [SOLVED] Resize window with mouse right drag in titlebar

damo wrote:

It may clash with other actions, which take priority? There is the default window Resize action ("A-Right") which resizes a window, but I guess you are looking for a quick one-handed method.

EDIT: it works for me hmm

      <mousebind button="Right" action="Drag">
        <action name="Resize"/>
      </mousebind>

You need to keep away from the middle area of the titlebar to get the resize action in both dimensions, otherwise it just works vertically.

I think it works for you because you have "button" followed by "action". B-rex has "action" followed by "button", so the action is ignored, then the button is just a click on the titlebar - which will conflict with the raise/focus mouse binding.

From the openbox help page:

A mouse binding is specified as follows:

<mouse>
  ...
  <context name="CONTEXT...">
    <mousebind button="BUTTON..." action="EVENT">
      ...ACTIONS...
    </mousebind>
  </context>
  ...
</mouse>


You must unlearn what you have learned.
    -- yoda

Offline

#6 2019-11-02 12:38:17

brontosaurusrex
Middle Office
Registered: 2015-09-29
Posts: 2,038
Website

Re: [SOLVED] Resize window with mouse right drag in titlebar

Ok, solved, it had a misunderstanding with my rightMice scrolling thing (which was globally set to scroll).

Last edited by brontosaurusrex (2019-11-02 12:50:35)

Offline

#7 2019-11-02 14:47:21

damo
....moderator....
Registered: 2015-08-20
Posts: 6,036

Re: [SOLVED] Resize window with mouse right drag in titlebar

PackRat wrote:

...
I think it works for you because you have "button" followed by "action". B-rex has "action" followed by "button", so the action is ignored, then the button is just a click on the titlebar - which will conflict with the raise/focus mouse binding.

I tried it both ways, and they both worked hmm

To get a "click" action for the button, you need to specify that action AFAIK


Be Excellent to Each Other...
The Bunsenlabs Lithium Desktop » Here
FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt  «» BunsenLabs on DeviantArt

Offline

#8 2019-11-05 19:50:19

misko_2083
Member
Registered: 2016-05-24
Posts: 344

Re: [SOLVED] Resize window with mouse right drag in titlebar

I was messing with Xlib for the last week
and made a little app that you can use to
draw the position and size of top-most window in the window stack.
Can this be used with openbox?
Demo with yad: https://youtu.be/cwJMRKAQAMU?t=17


Што ни оштровиди ум сагледати не може - љубав превазилази.

Offline

Board footer

Powered by FluxBB