Set these two variables indepently of each other as this is cleaner and
more explicit.
In openbox <raiseOnFocus> only applies if <followMouse> is set, but there
is no need to immitate this.
Issue #144
Add `#define _POSIX_C_SOURCE 200809L` to avoid the error below:
../src/cursor.c: In function 'cursor_update_focus':
../src/cursor.c:271:2: warning: implicit declaration of function
'clock_gettime' [-Wimplicit-function-declaration]
271 | clock_gettime(CLOCK_MONOTONIC, &now);
| ^~~~~~~~~~~~~
../src/cursor.c:271:16: error: 'CLOCK_MONOTONIC' undeclared (first use in
this function)
271 | clock_gettime(CLOCK_MONOTONIC, &now);
| ^~~~~~~~~~~~~~~
../src/cursor.c:271:16: note: each undeclared identifier is reported only
once for each function it appears in
../src/cursor.c: In function 'is_double_click':
../src/cursor.c:486:16: error: 'CLOCK_MONOTONIC' undeclared (first use in
this function)
486 | clock_gettime(CLOCK_MONOTONIC, &now);
| ^~~~~~~~~~~~~~~
Before this change a window that had been minimized showed up with states Minimized and Activated.
For foreign-toplevel clients like taskbars that could mean to handle multiple windows at once
having a 'activated' state even though they were clearly minimized.
Handlers for the "destroy" signal need to unregister themselves from the
signal (using wl_list_remove()) before invoking free().
Invalid write of size 8
at 0x487DF27: wl_list_remove (in /usr/lib/libwayland-server.so.0.20.0)
by 0x4906FF0: wlr_signal_emit_safe (signal.c:32)
by 0x48EA304: reset_xdg_surface (wlr_xdg_surface.c:430)
by 0x48EA3D6: UnknownInlinedFun (wlr_xdg_surface.c:464)
by 0x48EA3D6: xdg_surface_handle_resource_destroy (wlr_xdg_surface.c:282)
by 0x4877899: ??? (in /usr/lib/libwayland-server.so.0.20.0)
by 0x487DEBF: ??? (in /usr/lib/libwayland-server.so.0.20.0)
by 0x487E3DF: ??? (in /usr/lib/libwayland-server.so.0.20.0)
by 0x487830D: wl_client_destroy (in /usr/lib/libwayland-server.so.0.20.0)
by 0x48783F6: ??? (in /usr/lib/libwayland-server.so.0.20.0)
by 0x487B1C9: wl_event_loop_dispatch (in /usr/lib/libwayland-server.so.0.20.0)
by 0x4878D36: wl_display_run (in /usr/lib/libwayland-server.so.0.20.0)
by 0x110DAC: main (main.c:81)
Address 0xc3213d8 is 424 bytes inside a block of size 704 free'd
at 0x484118B: free (vg_replace_malloc.c:755)
by 0x4906FDD: wlr_signal_emit_safe (signal.c:29)
by 0x48EA304: reset_xdg_surface (wlr_xdg_surface.c:430)
by 0x48EA3D6: UnknownInlinedFun (wlr_xdg_surface.c:464)
by 0x48EA3D6: xdg_surface_handle_resource_destroy (wlr_xdg_surface.c:282)
by 0x4877899: ??? (in /usr/lib/libwayland-server.so.0.20.0)
by 0x487DEBF: ??? (in /usr/lib/libwayland-server.so.0.20.0)
by 0x487E3DF: ??? (in /usr/lib/libwayland-server.so.0.20.0)
by 0x487830D: wl_client_destroy (in /usr/lib/libwayland-server.so.0.20.0)
by 0x48783F6: ??? (in /usr/lib/libwayland-server.so.0.20.0)
by 0x487B1C9: wl_event_loop_dispatch (in /usr/lib/libwayland-server.so.0.20.0)
by 0x4878D36: wl_display_run (in /usr/lib/libwayland-server.so.0.20.0)
by 0x110DAC: main (main.c:81)
Block was alloc'd at
at 0x48435FF: calloc (vg_replace_malloc.c:1117)
by 0x113E22: xdg_surface_new (xdg.c:401)
by 0x4906FDD: wlr_signal_emit_safe (signal.c:29)
by 0x48EABE7: handle_xdg_surface_commit (wlr_xdg_surface.c:331)
by 0x4908FE7: surface_commit_state (wlr_surface.c:457)
by 0x524DD49: ??? (in /usr/lib/libffi.so.8.1.0)
by 0x524D266: ??? (in /usr/lib/libffi.so.8.1.0)
by 0x487D322: ??? (in /usr/lib/libwayland-server.so.0.20.0)
by 0x48785CB: ??? (in /usr/lib/libwayland-server.so.0.20.0)
by 0x487B1C9: wl_event_loop_dispatch (in /usr/lib/libwayland-server.so.0.20.0)
by 0x4878D36: wl_display_run (in /usr/lib/libwayland-server.so.0.20.0)
by 0x110DAC: main (main.c:81)
Invalid write of size 8
at 0x487DF27: wl_list_remove (in /usr/lib/libwayland-server.so.0.20.0)
by 0x4906FF0: wlr_signal_emit_safe (signal.c:32)
by 0x48F5529: UnknownInlinedFun (wlr_input_device.c:34)
by 0x48F5529: wlr_input_device_destroy (wlr_input_device.c:29)
by 0x48CE4B5: backend_destroy.part.0.lto_priv.0 (backend.c:148)
by 0x48D2D55: multi_backend_destroy (backend.c:59)
by 0x48788FE: wl_display_destroy (in /usr/lib/libwayland-server.so.0.20.0)
by 0x110E71: UnknownInlinedFun (server.c:406)
by 0x110E71: main (main.c:83)
Address 0xc466568 is 24 bytes inside a block of size 56 free'd
at 0x484118B: free (vg_replace_malloc.c:755)
by 0x4906FDD: wlr_signal_emit_safe (signal.c:29)
by 0x48F5529: UnknownInlinedFun (wlr_input_device.c:34)
by 0x48F5529: wlr_input_device_destroy (wlr_input_device.c:29)
by 0x48CE4B5: backend_destroy.part.0.lto_priv.0 (backend.c:148)
by 0x48D2D55: multi_backend_destroy (backend.c:59)
by 0x48788FE: wl_display_destroy (in /usr/lib/libwayland-server.so.0.20.0)
by 0x110E71: UnknownInlinedFun (server.c:406)
by 0x110E71: main (main.c:83)
Block was alloc'd at
at 0x48435FF: calloc (vg_replace_malloc.c:1117)
by 0x11590F: new_input_notify (seat.c:137)
by 0x4906FDD: wlr_signal_emit_safe (signal.c:29)
by 0x4906FDD: wlr_signal_emit_safe (signal.c:29)
by 0x48CDCEE: UnknownInlinedFun (events.c:109)
by 0x48CDCEE: UnknownInlinedFun (events.c:242)
by 0x48CDCEE: UnknownInlinedFun (backend.c:58)
by 0x48CDCEE: handle_libinput_readable (backend.c:48)
by 0x48CE1BE: backend_start.lto_priv.0 (backend.c:114)
by 0x48D2CE5: multi_backend_start (backend.c:33)
by 0x110C45: UnknownInlinedFun (server.c:375)
by 0x110C45: main (main.c:68)
...and call it from desktop_move_to_front() in order force an enter event
on the surface below the cursor when cycling views.
Inspired by PR #164 - just restructured it a bit.
Suggested-by: @bi4k8
Issue arises when using the default config from docs/rc.xml.all.
Without this patch only the last action defined inside a <mousebind>
will have an effect.
Without a config or when defining the same <mousebind> multiple times
with each containing only a single <action> the issue does not exist.
e.g., open an editor from a terminal, minimize it, then hit ^C in the terminal
simply don't unmap xdg or xwayland views if they are not currently marked as mapped
In OpenBox (as in most other stacking window managers), pressing
Alt-Tab once will cycle to the next window. This is especially
convenient in workflows which require switching back and forth
frequently between the two top windows.
If we don't switch focus, we want the close button to close the window associated with it, not the current focus window.
Signed-off-by: Joshua Ashton <joshua@froggi.es>
this was broken when we moved to swallowing mouse events that triggered "Frame"-context mouse bindings. layer surfaces don't run mouse binding logic, so they need mouse events unconditionally forwarded.
in order to allow the Move action to be bound to "press" on mouse binding contexts that also have "click" bindings, we should not short-circuit event processing when the input_mode is not passthrough (the "normal" mode). doing so seems to have been intended to prevent mouse bindings from being triggered during move/resize/menu interactions, but this does not seem to occur in practice. instead, `cursor_button`'s early return in this case caused the "release" side of "click" bindings to be ignored if their "press" side began an action that changes input_mode (e.g. Move).
the cleaner way to fix this interaction would be to use "drag" rather than "press" for Move bindings, but implementing "drag" is more complexity than I want to include in this changeset.
this change is its own commit to make it easy to bisect for, in case it causes regressions.