OpenBox: how to focus on mouse release, instead of mouse press?

Post here if you are a new Porteus member and you're looking for some help.
fulalas
DEV Team
DEV Team
Posts: 2050
Joined: 26 Oct 2016, 15:34
Distribution: Porteus
Location: Brazil

OpenBox: how to focus on mouse release, instead of mouse press?

Post#1 by fulalas » 28 Oct 2017, 00:14

On all Microsoft Windows, if you click on an icon inside a window and don't release the mouse button, this window isn't focused. This is useful for dragging 'n drop actions between different windows. Is it possible to set OpenBox to do the same?

User avatar
ncmprhnsbl
DEV Team
DEV Team
Posts: 3924
Joined: 20 Mar 2012, 03:42
Distribution: v5.0-64bit
Location: australia
Contact:

OpenBox: how to focus on mouse release, instead of mouse press?

Post#2 by ncmprhnsbl » 28 Oct 2017, 01:31

as far as i can see, there is no explicit configuration around 'click to focus' (being the default)
the focus section of rc.xml:

Code: Select all

<focus>
  <focusNew>yes</focusNew>
  <!-- always try to focus new windows when they appear. other rules do
       apply -->
  <followMouse>yes</followMouse>
  <!-- move focus to a window when you move the mouse into it -->
  <focusLast>no</focusLast>
  <!-- focus the last used window when changing desktops, instead of the one
       under the mouse pointer. when followMouse is enabled -->
  <underMouse>yes</underMouse>
  <!-- move focus under the mouse, even when the mouse is not moving -->
  <focusDelay>200</focusDelay>
  <!-- when followMouse is enabled, the mouse must be inside the window for
       this many milliseconds (1000 = 1 sec) before moving focus to it -->
  <raiseOnFocus>no</raiseOnFocus>
  <!-- when followMouse is enabled, and a window is given focus by moving the
       mouse into it, also raise the window -->
</focus>
is all about followMouse, which doesn't help...
EDIT
or maybe this might help: (from here: http://openbox.org/wiki/Help:Bindings#Mouse_bindings)
Event

The EVENT for a mouse binding specifies what mouse event triggers the actions contained within.

Press
The mouse button was pressed down in the specified context
Click
The mouse button was pressed and released in the specified context
DoubleClick
The mouse button was double clicked in the specified context
Release
The mouse button was released in the specified context
Drag
The mouse was dragged with the mouse button held down in the specified context
something like:

Code: Select all

 
<mousebind button="Left" action="Release">
  <action name="Focus"/>
  <action name="Raise"/>
</mousebind>
or Click?
or maybe not :(
Client
The application window, inside the window decorations.
Note: When a button is bound in this context, the clicks will be passed through to the application. However, because of this, only "Press" events can be used for this context.
Forum Rules : https://forum.porteus.org/viewtopic.php?f=35&t=44

fulalas
DEV Team
DEV Team
Posts: 2050
Joined: 26 Oct 2016, 15:34
Distribution: Porteus
Location: Brazil

OpenBox: how to focus on mouse release, instead of mouse press?

Post#3 by fulalas » 29 Oct 2017, 20:24

Thanks, man! But it didn't work :(

Post Reply