]> git.mdlowis.com Git - proto/labwc.git/log
proto/labwc.git
3 years agoseat: add seat_add_device helper
Joshua Ashton [Wed, 17 Aug 2022 18:16:16 +0000 (18:16 +0000)]
seat: add seat_add_device helper

3 years agoseat: add seat_update_capabilities helper
Joshua Ashton [Wed, 17 Aug 2022 18:12:24 +0000 (18:12 +0000)]
seat: add seat_update_capabilities helper

3 years agoview: no gap for top/left align big window
Johan Malm [Mon, 26 Sep 2022 19:16:43 +0000 (20:16 +0100)]
view: no gap for top/left align big window

On initial positioning of toplevel windows we call view_center().
During the centering process, if it turns out that the view is larger than
the output usable-area then we just top/left align it with no gap.

Relates to the gap aspect of issue #403

Reported-by: @Flrian
3 years agoCI: Add Debian testing
Consolatis [Fri, 23 Sep 2022 19:08:27 +0000 (21:08 +0200)]
CI: Add Debian testing

3 years agoFix minor coding-style violations
Johan Malm [Sat, 17 Sep 2022 11:31:07 +0000 (12:31 +0100)]
Fix minor coding-style violations

...based on https://github.com/johanmalm/checkpatch.pl

3 years agoCONTRIBUTING.md: improve all sections
Johan Malm [Sat, 17 Sep 2022 11:41:39 +0000 (12:41 +0100)]
CONTRIBUTING.md: improve all sections

...including guidelines on:

- the use of glib
- the use of GNU C extensions
- what commit messages should look like
- coding-style

3 years agocursor: Prevent setting cursor icon on drag
Consolatis [Wed, 21 Sep 2022 05:42:34 +0000 (07:42 +0200)]
cursor: Prevent setting cursor icon on drag

Partly fixes #549

3 years agoMerge pull request #438 from johanmalm/fix/repeat
Johan Malm [Wed, 21 Sep 2022 20:35:06 +0000 (21:35 +0100)]
Merge pull request #438 from johanmalm/fix/repeat

Revert "keyboard: cancel repeat when handling key-bind" and
only pass on pressed+sent keycodes to surfaces on keyboard-focus.

3 years agoseat: only pass on sent keys on surface-focus
Johan Malm [Tue, 20 Sep 2022 19:46:39 +0000 (20:46 +0100)]
seat: only pass on sent keys on surface-focus

Key events associated with keybindings (both pressed and released) are not
sent to clients. When using wlr_seat_keyboard_notify_enter() it it
therefore important not to send the keycodes of _all_ pressed keys, but
only those that were actually _sent_ to clients (that is, those that were
not bound).

This approach is consistent with sway's implementation in input/seat.c
https://github.com/swaywm/sway/blob/cffb006feba52c318e66f73c3463032fa76782dc/sway/input/seat.c#L173-L175

Fixes issue #510

3 years agosrc/keyboard.c: register keys before inhibit check
Johan Malm [Tue, 30 Aug 2022 20:07:27 +0000 (21:07 +0100)]
src/keyboard.c: register keys before inhibit check

Call key_state_set_pressed() before checking
seat->active_client_while_inhibited to avoid missing release events for
clients using the inhibit protocol (for example swaylock).

3 years agosrc/keyboard.c: do not end window-cycling on modifier release only
Johan Malm [Tue, 30 Aug 2022 14:47:00 +0000 (15:47 +0100)]
src/keyboard.c: do not end window-cycling on modifier release only

If a user lets go of the modifier (e.g. alt) before the 'normal' key (e.g.
tab) when window-cycling, we do not end the cycling until both keys have
been released.  If we end the window-cycling on release of the modifier
only, some XWayland clients such as hexchat realise that tab is pressed
(even though we did not forward the event) and because we absorb the
equivalent release event it gets stuck on repeat.

Just to clarify the position here: Issue #176 describes a behaviour
whereby dmenu gets stuck on repeat after being launched with a keybind.
This patch does not resolve that issue but reflects that in Wayland, the
client is responsible for implementing "key repeat".

Changing the key repeat rate/delay in (labwc/labwc@e62bb51) was dirty fix
that need should never have been made.

3 years agooutput: Call do_output_layout_change() at end of new_output_notify().
John Lindgren [Tue, 20 Sep 2022 05:17:22 +0000 (01:17 -0400)]
output: Call do_output_layout_change() at end of new_output_notify().

This fixes an issue with the wlr_output_cursor not being properly
initialized on new outputs, because wlr_output_layout.events.change
is triggered too soon, before the wlr_output_cursor exists.

3 years agosrc/menu.c: Clamp separator width
Consolatis [Tue, 20 Sep 2022 00:04:57 +0000 (02:04 +0200)]
src/menu.c: Clamp separator width

Reported-by: @Flrian
3 years agosrc/keyboard.c: reflow comment to shorten line
Johan Malm [Tue, 30 Aug 2022 14:43:57 +0000 (15:43 +0100)]
src/keyboard.c: reflow comment to shorten line

3 years agosrc/keyboard.c: stored handled keys as bound when window-cycling
Johan Malm [Tue, 30 Aug 2022 14:41:50 +0000 (15:41 +0100)]
src/keyboard.c: stored handled keys as bound when window-cycling

...and changing TTY

3 years agoRevert "keyboard: cancel repeat when handling key-bind"
Johan Malm [Mon, 11 Jul 2022 16:05:08 +0000 (17:05 +0100)]
Revert "keyboard: cancel repeat when handling key-bind"

This reverts commit e62bb51bfb33ee520e800cf98553d766824fe9cf.

Fixes #510

3 years agoMerge pull request #552 from jlindgren90/xmalloc
Consolatis [Mon, 19 Sep 2022 03:43:55 +0000 (05:43 +0200)]
Merge pull request #552 from jlindgren90/xmalloc

common: Add more friendly memory utilities

3 years agocommon: Expand comment for znew/znew_n()
John Lindgren [Sun, 18 Sep 2022 21:30:12 +0000 (17:30 -0400)]
common: Expand comment for znew/znew_n()

3 years agocommon: Add znew/znew_n() macros
John Lindgren [Sun, 18 Sep 2022 19:22:26 +0000 (15:22 -0400)]
common: Add znew/znew_n() macros

3 years agokeyboard: Fix SIGSEGV that showed up in out-of-memory fuzzing
John Lindgren [Sat, 17 Sep 2022 18:47:47 +0000 (14:47 -0400)]
keyboard: Fix SIGSEGV that showed up in out-of-memory fuzzing

Stack trace:

    #0  xkb_keymap_ref (keymap=keymap@entry=0x0) at ../libxkbcommon/src/keymap.c:61
    #1  0x00007f53a344ab99 in wlr_keyboard_set_keymap (kb=kb@entry=0x5571af8cb9a0, keymap=keymap@entry=0x0)
        at ../types/wlr_keyboard.c:174
    #2  0x00005571ade057e0 in keyboard_init (seat=0x7ffca0389680) at ../src/keyboard.c:229
    #3  seat_init (server=0x7ffca0389570) at ../src/seat.c:307
    #4  server_init (server=0x7ffca0389570) at ../src/server.c:308

3 years agoaction: Fix warning about freeing a (const char *)
John Lindgren [Fri, 16 Sep 2022 22:45:02 +0000 (18:45 -0400)]
action: Fix warning about freeing a (const char *)

3 years agocommon: Add additional memory utilities (xzalloc() etc.)
John Lindgren [Fri, 16 Sep 2022 22:41:02 +0000 (18:41 -0400)]
common: Add additional memory utilities (xzalloc() etc.)

3 years agoaction: Allow explicit None action without warning
John Lindgren [Tue, 6 Sep 2022 17:22:43 +0000 (13:22 -0400)]
action: Allow explicit None action without warning

3 years agocursor: Use enum for server set cursor names
Consolatis [Fri, 16 Sep 2022 00:23:44 +0000 (02:23 +0200)]
cursor: Use enum for server set cursor names

This mainly prevents having to use strcmp() on every mouse move.

3 years agocursor: Move cursor specific function definitions into cursor.h
Consolatis [Fri, 16 Sep 2022 00:03:32 +0000 (02:03 +0200)]
cursor: Move cursor specific function definitions into cursor.h

3 years agoseat: Fix use-after-free in touch_finish()
John Lindgren [Fri, 16 Sep 2022 00:02:06 +0000 (20:02 -0400)]
seat: Fix use-after-free in touch_finish()

3 years agokeyboard: Fix use-after-free in keyboard_finish()
John Lindgren [Thu, 15 Sep 2022 23:50:07 +0000 (19:50 -0400)]
keyboard: Fix use-after-free in keyboard_finish()

3 years agoaction: Select resize edges for Resize triggered by keybind
John Lindgren [Thu, 15 Sep 2022 12:31:37 +0000 (08:31 -0400)]
action: Select resize edges for Resize triggered by keybind

3 years agocursor: Split out cursor_button_press() and cursor_button_release()
John Lindgren [Wed, 14 Sep 2022 18:49:09 +0000 (14:49 -0400)]
cursor: Split out cursor_button_press() and cursor_button_release()

3 years agoconfig: s/OSD/OnScreenDisplay/ in <theme><font place="OSD">
Johan Malm [Thu, 15 Sep 2022 21:03:52 +0000 (22:03 +0100)]
config: s/OSD/OnScreenDisplay/ in <theme><font place="OSD">

...to comply with Openbox 3.6 spec [1]

"OSD" is still honoured to maintain backward compatibility.

[1]: http://openbox.org/wiki/Help:Configuration#Theme

3 years agoconfig: Add support for font slant and weight
John Lindgren [Thu, 15 Sep 2022 14:53:49 +0000 (10:53 -0400)]
config: Add support for font slant and weight

3 years agocursor: Store view + resize edges for move/resize in press event
John Lindgren [Thu, 15 Sep 2022 03:09:36 +0000 (23:09 -0400)]
cursor: Store view + resize edges for move/resize in press event

v2: Restore previous behavior for keybinds

3 years agocursor: Add struct cursor_context and clean up code
John Lindgren [Mon, 12 Sep 2022 08:54:00 +0000 (04:54 -0400)]
cursor: Add struct cursor_context and clean up code

v2:
 - Add surface to cursor_context, rename c -> ctx
 - Factor out determine_resize_edges()

3 years agoMerge pull request #533 from jlindgren90/fix-gtk-menus
Consolatis [Wed, 14 Sep 2022 04:03:17 +0000 (06:03 +0200)]
Merge pull request #533 from jlindgren90/fix-gtk-menus

cursor: Fix GTK3 menus when keeping the button pressed

3 years agocursor: Allow leave/enter events within the same XDG toplevel
John Lindgren [Sat, 10 Sep 2022 05:57:39 +0000 (01:57 -0400)]
cursor: Allow leave/enter events within the same XDG toplevel

Attempting to open a GTK3 menu and activate a menu item in it,
using a single mouse motion (press-move-release), was broken due
to GTK apparently expecting to receive leave/enter events when the
cursor enters the menu (XDG popup).

To fix the issue, allow leave/enter events when the cursor is
moved between an XDG toplevel and popups of the same.

v2:
 - Use (struct view *) as proxy for toplevel in comparisons
 - Update seat->pressed.surface when entering/leaving popups
v3:
 - Go back to using get_toplevel() rather than (struct view *)

3 years agoxdg-popup: Check for NULL from wlr_xdg_surface_from_wlr_surface()
John Lindgren [Tue, 13 Sep 2022 16:51:23 +0000 (12:51 -0400)]
xdg-popup: Check for NULL from wlr_xdg_surface_from_wlr_surface()

Also eliminate struct view_child and replace it with a simple
(struct view *)parent_view field.

3 years agoseat: Listen for destroy signal of pressed.surface
John Lindgren [Tue, 13 Sep 2022 14:55:59 +0000 (10:55 -0400)]
seat: Listen for destroy signal of pressed.surface

3 years agoMerge pull request #540 from jlindgren90/cursor-fixes
Consolatis [Tue, 13 Sep 2022 18:55:32 +0000 (20:55 +0200)]
Merge pull request #540 from jlindgren90/cursor-fixes

cursor: Factor out cursor_update_common() and fix some glitches

3 years agocursor: Factor out cursor_update_common() and fix some glitches
John Lindgren [Mon, 12 Sep 2022 17:14:18 +0000 (13:14 -0400)]
cursor: Factor out cursor_update_common() and fix some glitches

Fix a couple of glitches seen when exiting interactive move/resize:

 - Cursor briefly set to left_ptr rather than the correct cursor image
 - Cursor not updated if the view being moved/resized is destroyed

Also make sure to exit interactive mode if the view is going fullscreen
(labwc gets very confused otherwise).

Code changes in detail:

 - Factor out set_server_cursor() which will set the correct cursor
   image for non-client areas (either XCURSOR_DEFAULT or one of the
   resize cursors).
 - Unify the logic from cursor_rebase() and process_cursor_motion by
   factoring out cursor_update_common().  This corrects some logic
   discrepancies between the two, which should be a good thing(TM).
 - Remove the extra cursor_set(XCURSOR_DEFAULT) from interactive_end()
   and instead rely on cursor_update_focus() to do the right thing.
 - Simplify cursor_button() by just calling interactive_end() when we
   want to exit interactive mode.
 - Call cursor_update_focus() from view_destroy() if the view had mouse
   focus or was being interactively moved/resized.

v2: Eliminate force_reenter parameters and figure out automatically
    when we need to re-enter the surface.
v3: Rename wlseat -> wlr_seat.
v4: Simplify client/server cursor logic.

3 years agorcxml.c: enable tap be default on non-touch devices
Johan Malm [Fri, 9 Sep 2022 20:51:08 +0000 (21:51 +0100)]
rcxml.c: enable tap be default on non-touch devices

Some trackpads do not honour tap if we only enable it on touch-devices.

3 years agocursor: Handle missing cursor theme
Consolatis [Sat, 10 Sep 2022 21:53:35 +0000 (23:53 +0200)]
cursor: Handle missing cursor theme

Temporary fix for #246

This should be reverted once wlroots MR !3651 is merged.

3 years agocursor: Don't load cursor theme in server_init()
Consolatis [Sat, 10 Sep 2022 22:05:30 +0000 (00:05 +0200)]
cursor: Don't load cursor theme in server_init()

We are already doing that in seat_init() -> cursor_init()

3 years agocursor: Prevent setting the same cursor image twice
Consolatis [Sat, 10 Sep 2022 17:48:49 +0000 (19:48 +0200)]
cursor: Prevent setting the same cursor image twice

Possibly fixes #512

Reported-by: @Flrian
3 years agocursor: Prevent resetting cursor icon during Move or Resize
Consolatis [Sat, 10 Sep 2022 17:19:02 +0000 (19:19 +0200)]
cursor: Prevent resetting cursor icon during Move or Resize

Reported-by: @Flrian
3 years agocursor: Allow re-enter for cursor_update_focus()
Consolatis [Sun, 11 Sep 2022 05:08:28 +0000 (07:08 +0200)]
cursor: Allow re-enter for cursor_update_focus()

This allows forcing an application to re-set their desired cursor image.

3 years agoMerge pull request #531 from jlindgren90/titlebar-fixes
Johan Malm [Fri, 9 Sep 2022 20:35:30 +0000 (21:35 +0100)]
Merge pull request #531 from jlindgren90/titlebar-fixes

Titlebar fixes

3 years agossd: Make ssd_get_part_type() work for corner buttons
John Lindgren [Thu, 8 Sep 2022 17:16:19 +0000 (13:16 -0400)]
ssd: Make ssd_get_part_type() work for corner buttons

Corner buttons (WINDOW_MENU and CLOSE) are one more level down in
the scene-tree (see add_scene_button_corner() in ssd_part.c).

This fixes a minor issue where, when right-clicking on the CLOSE
button, the client-menu would be displayed in the wrong location.

3 years agoconfig: Redefine Title context to include blank areas of Titlebar
John Lindgren [Thu, 8 Sep 2022 17:20:48 +0000 (13:20 -0400)]
config: Redefine Title context to include blank areas of Titlebar

... and use Title for the Drag (Move) and DoubleClick (Maximize)
titlebar actions, which are unexpected when the cursor is over one
of the window buttons.

3 years agoMerge pull request #523 from jlindgren90/unmanaged-cursor-focus
Johan Malm [Fri, 9 Sep 2022 14:48:14 +0000 (15:48 +0100)]
Merge pull request #523 from jlindgren90/unmanaged-cursor-focus

cursor: Update focus when unmanaged surfaces are mapped/unmapped

3 years agoMerge pull request #526 from Consolatis/issue/317_gimp_remap
Johan Malm [Fri, 9 Sep 2022 14:32:14 +0000 (15:32 +0100)]
Merge pull request #526 from Consolatis/issue/317_gimp_remap

xwayland: Keep view->xwayland_surface and view->surface in sync

3 years agointeractive: Don't write to view->x/y/w/h directly
John Lindgren [Thu, 8 Sep 2022 15:50:40 +0000 (11:50 -0400)]
interactive: Don't write to view->x/y/w/h directly

Otherwise, the scene-graph isn't updated when calling
view->impl->configure(), and the view ends up in a weird
half-maximized state.

3 years agocursor: Update cursor focus on scroll events
Consolatis [Wed, 7 Sep 2022 23:30:29 +0000 (01:30 +0200)]
cursor: Update cursor focus on scroll events

3 years agocursor: Make cursor_rebase() private
Consolatis [Wed, 7 Sep 2022 23:07:55 +0000 (01:07 +0200)]
cursor: Make cursor_rebase() private

Also allow to re-use node, surface, sx and sy.

3 years agocursor: Allow cursor button events to trigger cursor_rebase()
Consolatis [Wed, 7 Sep 2022 22:57:59 +0000 (00:57 +0200)]
cursor: Allow cursor button events to trigger cursor_rebase()

3 years agosrc/xdg.c: Only call view_moved() when required
Consolatis [Wed, 7 Sep 2022 22:55:57 +0000 (00:55 +0200)]
src/xdg.c: Only call view_moved() when required

3 years agodesktop: Cycle first to topmost view if not already focused
John Lindgren [Fri, 2 Sep 2022 20:41:27 +0000 (16:41 -0400)]
desktop: Cycle first to topmost view if not already focused

The topmost view may not always be the focused view; for example,
when Audacious's main window is focused but the floating Search
Tool window remains on top of it.  In that case the floating window
(not the main window) should be the first view selected in the
window switcher.

3 years agocursor: Update SSD hover state in cursor_rebase()
John Lindgren [Tue, 6 Sep 2022 16:05:47 +0000 (12:05 -0400)]
cursor: Update SSD hover state in cursor_rebase()

Fixes an issue where the maximize button would remain highlighted
after maximized a window.

3 years agocursor: Update focus at various additional points
John Lindgren [Sat, 3 Sep 2022 21:46:53 +0000 (17:46 -0400)]
cursor: Update focus at various additional points

- When XDG and XWayland views are positioned (view_moved()).
- When unmanaged XWayland surfaces are mapped, unmapped, or moved.

Do not update cursor focus during an out-of-surface drag.

Along with the existing call in desktop_move_to_front(), this
should hopefully cover the majority of cases where the cursor focus
could get out-of-date, with the possible exception of layer-shell
surfaces.

3 years agosrc/xwayland.c: Keep view->surface in sync
Consolatis [Sat, 3 Sep 2022 23:32:12 +0000 (01:32 +0200)]
src/xwayland.c: Keep view->surface in sync

3 years agosrc/xwayland.c: Update xsurface on client map request
Consolatis [Sat, 3 Sep 2022 22:22:43 +0000 (00:22 +0200)]
src/xwayland.c: Update xsurface on client map request

3 years agoxwayland: Don't center views with explicitly specified position
John Lindgren [Mon, 5 Sep 2022 01:45:03 +0000 (21:45 -0400)]
xwayland: Don't center views with explicitly specified position

3 years agoview: Call view_moved() immediately after map
John Lindgren [Mon, 5 Sep 2022 02:47:54 +0000 (22:47 -0400)]
view: Call view_moved() immediately after map

At least for XWayland surfaces, handle_commit() is not always
called after map(), and as a result, the scene-graph node is never
positioned.

Not sure 100% if the same can occur with XDG surfaces, but the
extra view_moved() call should be harmless, so add it there too
for consistency.

3 years agoxwayland: Factor out focus_next_surface() from unmanaged_handle_unmap()
John Lindgren [Sat, 3 Sep 2022 17:10:33 +0000 (13:10 -0400)]
xwayland: Factor out focus_next_surface() from unmanaged_handle_unmap()

- Eliminate multiple "return" paths in unmanaged_handle_unmap(), which
  were a bug waiting to happen.
- Use wl_list_for_each_reverse() rather than wl_list_for_each() to find
  the topmost (most-recently-created) unmanaged surface.
- Only call desktop_focus_topmost_mapped_view() if the unmapped surface
  was actually focused.

3 years agoCI: Split jobs
Consolatis [Fri, 2 Sep 2022 03:55:39 +0000 (05:55 +0200)]
CI: Split jobs

3 years agoCI: Additionally build without xwayland
Consolatis [Fri, 2 Sep 2022 03:30:12 +0000 (05:30 +0200)]
CI: Additionally build without xwayland

3 years agocursor: Fix out-of-surface movement for unmanaged surfaces
John Lindgren [Thu, 1 Sep 2022 21:50:28 +0000 (17:50 -0400)]
cursor: Fix out-of-surface movement for unmanaged surfaces

3 years agoxwayland: Keep unmanaged surfaces stacked on top
John Lindgren [Thu, 1 Sep 2022 18:33:42 +0000 (14:33 -0400)]
xwayland: Keep unmanaged surfaces stacked on top

3 years agosrc/xwayland-unmanaged.c: Give keyboard focus back to topmost mapped view
Consolatis [Tue, 30 Aug 2022 18:10:21 +0000 (20:10 +0200)]
src/xwayland-unmanaged.c: Give keyboard focus back to topmost mapped view

Previously, when unmapping and not finding another unmanaged surface
to give keyboard focus to we were not doing anything. With this patch
we will give focus to the topmost mapped view which is the same
behavior that also happens when an usual X11 surface unmaps.

This fixes dmenu when being exited with ESC.

Reported-by: @Flrian
3 years agosrc/config/rcxml.c: Add support for <devault /> mousebinds
Consolatis [Mon, 29 Aug 2022 21:43:13 +0000 (23:43 +0200)]
src/config/rcxml.c: Add support for <devault /> mousebinds

This loads default mousebinds and provides a way to keep config files
simpler whilst allowing user specific binds.

Note that if no rc.xml is found, or if no <mouse><mousebind> entries
exist, the same default mousebinds will be loaded even if the <devault />
element is not provided.

Example usage (with a slight spelling error):

  <mouse>
    <default />
    <context name="Root">
      <mousebind button="Right" action="Press">
        <action name="ShowMenu" menu="desktop-menu" />
      </mousebind>
    </context>
  </mouse>

Co-Authored-By: @johanmalm
Fixes #416

3 years agosrc/config/rcxml.c: Replace earlier mousebinds by later ones
Consolatis [Mon, 29 Aug 2022 21:42:40 +0000 (23:42 +0200)]
src/config/rcxml.c: Replace earlier mousebinds by later ones

3 years agosrc/config/mousebind.c: Fix mousebind ordering
Consolatis [Mon, 29 Aug 2022 21:06:53 +0000 (23:06 +0200)]
src/config/mousebind.c: Fix mousebind ordering

3 years agosrc/config/rcxml.c: Merge default mousebinds
Consolatis [Mon, 29 Aug 2022 20:47:34 +0000 (22:47 +0200)]
src/config/rcxml.c: Merge default mousebinds

3 years agosrc/view.c: Fix minimizing the last window
Consolatis [Tue, 30 Aug 2022 00:10:56 +0000 (02:10 +0200)]
src/view.c: Fix minimizing the last window

Before this patch, minimizing the last un-minimized window would
not cause it to be set to inactive. This in turn would confuse panels
which depend on the 'active' flag to decide when to either activate or
minimize the clicked on window.

Reported-by: @Flrian
Predicted-by: @johanmalm
3 years agoMerge pull request #307 from Consolatis/feature/tab_preview
Johan Malm [Sun, 28 Aug 2022 21:20:53 +0000 (22:20 +0100)]
Merge pull request #307 from Consolatis/feature/tab_preview

Feature/tab preview: restore functionality after the move to scene-graph

3 years agoMove OSD handler for view destruction to osd.c
Consolatis [Mon, 22 Aug 2022 00:54:40 +0000 (02:54 +0200)]
Move OSD handler for view destruction to osd.c

3 years agosrc/osd.c: Integrate preview outline into OSD state
Consolatis [Sun, 21 Aug 2022 22:42:01 +0000 (00:42 +0200)]
src/osd.c: Integrate preview outline into OSD state

3 years agoalt-tab preview: restore functionality after move to scene-graph
Consolatis [Tue, 26 Apr 2022 21:56:27 +0000 (23:56 +0200)]
alt-tab preview: restore functionality after move to scene-graph

3 years agoPrepare OSD for reimplementation of the preview feature
Consolatis [Tue, 26 Apr 2022 20:06:22 +0000 (22:06 +0200)]
Prepare OSD for reimplementation of the preview feature

3 years agoChase wlroots: Culling
Consolatis [Sat, 27 Aug 2022 14:21:22 +0000 (16:21 +0200)]
Chase wlroots: Culling

To update the wlroots subproject use
meson subprojects update wlroots

Chases wlroots fa7d2cb8d60ed48c44c707106c03682056ddfaca
wlr_scene: Only consider visible parts of the node when culling background

Fixes #501

3 years agoosd: position preview border within SSD max extents
Johan Malm [Sat, 27 Aug 2022 12:26:30 +0000 (13:26 +0100)]
osd: position preview border within SSD max extents

This makes the border visible when alt-tabbing maximized windows and
prevents it from rendering on other outputs or on top of exclusive
layer-surfaces such as panels.

Closes issue #496

3 years agoview/ssd: Refactor and fix visual indication for active windows
John Lindgren [Fri, 26 Aug 2022 06:02:19 +0000 (02:02 -0400)]
view/ssd: Refactor and fix visual indication for active windows

Partially fixes #494.

Co-Authored-by: Consolatis
3 years agosrc/{common/font,theme}.c: Switch to cairo helpers
Consolatis [Fri, 26 Aug 2022 02:50:54 +0000 (04:50 +0200)]
src/{common/font,theme}.c: Switch to cairo helpers

3 years agoDisconnect view from destroying output
Consolatis [Wed, 24 Aug 2022 19:12:24 +0000 (21:12 +0200)]
Disconnect view from destroying output

Fixes #497

Reported-by @Flrian

3 years agoAdd config option to disable preview outlines
Flrian [Wed, 24 Aug 2022 18:27:08 +0000 (20:27 +0200)]
Add config option to disable preview outlines

3 years agokeyboard: Hide Alt-Tab switcher when canceling via Escape
John Lindgren [Sun, 21 Aug 2022 19:07:16 +0000 (15:07 -0400)]
keyboard: Hide Alt-Tab switcher when canceling via Escape

3 years agoosd: Do not show window switcher on disabled outputs
John Lindgren [Sun, 21 Aug 2022 19:01:32 +0000 (15:01 -0400)]
osd: Do not show window switcher on disabled outputs

3 years agosrc/osd.c: Add preview outlines
Consolatis [Mon, 4 Jul 2022 18:15:03 +0000 (20:15 +0200)]
src/osd.c: Add preview outlines

3 years agocommon/graphic-helpers: Add cairo helpers
Consolatis [Sat, 20 Aug 2022 18:11:58 +0000 (20:11 +0200)]
common/graphic-helpers: Add cairo helpers

3 years agocommon/graphic-helpers: Add multi_rect
Consolatis [Fri, 19 Aug 2022 22:01:06 +0000 (00:01 +0200)]
common/graphic-helpers: Add multi_rect

3 years agolabwc-theme(5): add menu.xbm
Johan Malm [Fri, 19 Aug 2022 21:50:12 +0000 (22:50 +0100)]
labwc-theme(5): add menu.xbm

3 years agoview: view_move() s/double/int/ for x and y
Johan Malm [Wed, 17 Aug 2022 20:41:49 +0000 (21:41 +0100)]
view: view_move() s/double/int/ for x and y

3 years agofunc output_destroy_notify add free
yizixiao [Wed, 17 Aug 2022 05:36:33 +0000 (13:36 +0800)]
func output_destroy_notify add free

3 years agosrc/cursor.c: refactor nested if-statements
Johan Malm [Tue, 16 Aug 2022 20:57:37 +0000 (21:57 +0100)]
src/cursor.c: refactor nested if-statements

3 years agocursor: do not clamp motion coordinates for xdg-shell surfaces
Johan Malm [Tue, 16 Aug 2022 20:56:39 +0000 (21:56 +0100)]
cursor: do not clamp motion coordinates for xdg-shell surfaces

...when pointer moves off the xdg-shell surface which is possible when
for example grabbing a scroll-bar or selecting text.

Clamping results in undetected pointer motion when applied in the
direction of movement (for example clamping at view->y masks vertical
movement when the y-coordinate is greater than view->y), which in turn
can appear as sporadic to the end-user.

3 years agosrc/cursor.c: Keep sending motion events for out-of-layer-surface
Consolatis [Sun, 14 Aug 2022 12:40:56 +0000 (14:40 +0200)]
src/cursor.c: Keep sending motion events for out-of-layer-surface

Previously, motion events for a cursor which had been pressed on a surface
and then moved out of the surface were only sent for XDG and X11 surfaces.

This patch includes layer surfaces as well.

Fixes #483

3 years agocursor: Do not clamp motion coordinates for XWayland surfaces.
John Lindgren [Sat, 13 Aug 2022 15:36:07 +0000 (11:36 -0400)]
cursor: Do not clamp motion coordinates for XWayland surfaces.

X11 apps expect to be able to receive motion events outside
the window area (this is necessary for client-side move/resize
handles to work properly).  So do not clamp the motion
coordinates for XWayland surfaces.

Before this change, attempting to enlarge an XWayland window
using a client-side resize handle resulted in the window size
lagging behind the mouse cursor quite severely, since each
motion event was in effect allowed to expand the window by
only a few pixels.  The closer the initial button-press was
to the edge of the window, the worse the lag would be.

3 years agokeybind: remove default alt-escape for Exit
Johan Malm [Fri, 12 Aug 2022 20:36:26 +0000 (21:36 +0100)]
keybind: remove default alt-escape for Exit

...because too many have exited the compositor by mistake trying to get
out of alt-tab cycling or similar.

3 years agosrc/ssd/ssd_titlebar.c: Completely hide title when running out of space
Consolatis [Fri, 12 Aug 2022 12:12:31 +0000 (14:12 +0200)]
src/ssd/ssd_titlebar.c: Completely hide title when running out of space

Before this commit the window title could overflow in certain conditions,
usually when rapidly resizing. This commit fixes it by completely hiding
the corresponding scene node when there is no space available.

Reported-by: <peperino> via IRC
3 years agoscaled_font_buffer.c: simplify calls to zfree()
Johan Malm [Tue, 2 Aug 2022 21:01:51 +0000 (22:01 +0100)]
scaled_font_buffer.c: simplify calls to zfree()

There is no need to check foo != NULL before zfree(foo)

3 years agomenu: render submenu arrows
Johan Malm [Tue, 2 Aug 2022 21:00:24 +0000 (22:00 +0100)]
menu: render submenu arrows