hy3 icon indicating copy to clipboard operation
hy3 copied to clipboard

Clicking on tab bars results in mouse click being sent through to window on next workspace

Open g-regex opened this issue 1 year ago • 9 comments

Hi! I'm using hyprland 0.41.2 with the corresponding version of hy3 and have the following issue:

When clicking on a tab bar on one workspace, the click is sent to the active window on the next workspace.

For example, if workspace 1 looks like this ... 20240714_12h56m40s_grim

... and workspace 2 looks like this ... 20240714_12h56m44s_grim

... then, clicking on the left tab bar on workspace 1 results in the click being sent to the window on workspace 2, which in this case opens a menu: 20240714_12h56m48s_grim

The tab is switched as expected though.

Here is my hyprland.conf:

monitor=,preferred,auto,auto

plugin = $HOME/.local/share/hyprpm/hy3/hy3.so

env = XCURSOR_SIZE,24

plugin {
    hy3 {
        no_gaps_when_only = true

        tabs {
              height = 5
              padding = 8
              render_text = false
        }

        autotile {
            enable = true
            trigger_width = 800
            trigger_height = 500
        }
    }
}

input {
    kb_layout = us,ch
    kb_options = grp:shift_caps_toggle

    follow_mouse = 0

    touchpad {
        natural_scroll = no
        clickfinger_behavior = yes
        tap-and-drag = true
    }

    sensitivity = 0

    float_switch_override_focus = 0
}

group {
    groupbar {
        gradients = false
        col.active = rgba(33ccffee) rgba(00ff99ee) 45deg
        col.inactive = rgba(595959aa)
    }
    col.border_active = rgba(33ccffee) rgba(00ff99ee) 45deg
    col.border_inactive = rgba(595959aa)
}

general {

    gaps_in = 5
    gaps_out = 20
    border_size = 2
    col.active_border = rgba(33ccffee) rgba(00ff99ee) 45deg
    col.inactive_border = rgba(595959aa)

    layout = hy3

    allow_tearing = false
}

decoration {
    rounding = 10

    blur {
        enabled = no
        size = 3
        passes = 1
    }

    drop_shadow = no
    shadow_range = 4
    shadow_render_power = 3
    col.shadow = rgba(1a1a1aee)

	dim_around = 0.7
}

animations {
    enabled = yes
    bezier = myBezier, 0.05, 0.9, 0.1, 1.05
    animation = windows, 1, 7, myBezier
    animation = windowsOut, 1, 7, default, popin 80%
    animation = border, 1, 10, default
    animation = borderangle, 1, 8, default
    animation = fade, 1, 7, default
    animation = workspaces, 1, 6, default
}

dwindle {
    pseudotile = yes
    preserve_split = yes
}

gestures {
    workspace_swipe = true
    workspace_swipe_fingers = 3
    workspace_swipe_forever = true
    workspace_swipe_cancel_ratio = 0.15
}

misc {
    force_default_wallpaper = 0
	disable_hyprland_logo = true
	enable_swallow = false
	swallow_regex = ^(URxvt)$
	layers_hog_keyboard_focus = true
}

$mainMod = SUPER

bind = $mainMod, RETURN, exec, urxvt
bind = $mainMod, C, killactive,
bind = $mainMod+SHIFT, space, togglefloating,
bind = $mainMod, D, exec, bemenu-run -b -f -p ">"
bind = $mainMod+SHIFT, F, fakefullscreen
bind = $mainMod, F, fullscreen
bind = $mainMod, S, pin

bind = $mainMod SHIFT CTRL, H, movegroupwindow, b
bind = $mainMod SHIFT CTRL, L, movegroupwindow, f

bind = $mainMod, 1, workspace, 1
bind = $mainMod, 2, workspace, 2
bind = $mainMod, 3, workspace, 3
bind = $mainMod, 4, workspace, 4
bind = $mainMod, 5, workspace, 5
bind = $mainMod, 6, workspace, 6
bind = $mainMod, 7, workspace, 7
bind = $mainMod, 8, workspace, 8
bind = $mainMod, 9, workspace, 9
bind = $mainMod, 0, workspace, 10
bind = $mainMod ALT, 1, workspace, 11

bind = $mainMod, mouse_down, workspace, e+1
bind = $mainMod, mouse_up, workspace, e-1

bind = $mainMod+ALT, f, exec, hyprctl keyword input:follow_mouse 1
bind = $mainMod+ALT+SHIFT, f, exec, hyprctl keyword input:follow_mouse 0

bindm = $mainMod, mouse:272, movewindow
bindm = $mainMod, mouse:273, resizewindow

# hy3 bindings

bindn = , mouse:272, hy3:focustab, mouse
bindn = , mouse_down, hy3:focustab, l, require_hovered
bindn = , mouse_up, hy3:focustab, r, require_hovered

bind = $mainMod, e, hy3:changegroup, opposite
bind = $mainMod, r, hy3:expand, expand
bind = $mainMod+SHIFT, r, hy3:expand, base
bind = $mainMod, a, hy3:changefocus, raise
bind = $mainMod+SHIFT, a, hy3:changefocus, lower

bind = $mainMod SHIFT, 1, hy3:movetoworkspace, 1
bind = $mainMod SHIFT, 2, hy3:movetoworkspace, 2
bind = $mainMod SHIFT, 3, hy3:movetoworkspace, 3
bind = $mainMod SHIFT, 4, hy3:movetoworkspace, 4
bind = $mainMod SHIFT, 5, hy3:movetoworkspace, 5
bind = $mainMod SHIFT, 6, hy3:movetoworkspace, 6
bind = $mainMod SHIFT, 7, hy3:movetoworkspace, 7
bind = $mainMod SHIFT, 8, hy3:movetoworkspace, 8
bind = $mainMod SHIFT, 9, hy3:movetoworkspace, 9
bind = $mainMod SHIFT, 0, hy3:movetoworkspace, 10
bind = $mainMod ALT SHIFT, 1, hy3:movetoworkspace, 11

bind = $mainMod, g, hy3:makegroup, v, ephemeral
bind = $mainMod, w, hy3:changegroup, toggletab
bind = $mainMod+SHIFT, q, hy3:killactive

bind = $mainMod, h, hy3:movefocus, l
bind = $mainMod, l, hy3:movefocus, r
bind = $mainMod, k, hy3:movefocus, u
bind = $mainMod, j, hy3:movefocus, d

bind = $mainMod+CONTROL, h, hy3:movefocus, l, visible
bind = $mainMod+CONTROL, j, hy3:movefocus, d, visible
bind = $mainMod+CONTROL, k, hy3:movefocus, u, visible
bind = $mainMod+CONTROL, l, hy3:movefocus, r, visible

bind = $mainMod+CONTROL+SHIFT, h, hy3:movewindow, l, once, visible
bind = $mainMod+CONTROL+SHIFT, j, hy3:movewindow, d, once, visible
bind = $mainMod+CONTROL+SHIFT, k, hy3:movewindow, u, once, visible
bind = $mainMod+CONTROL+SHIFT, l, hy3:movewindow, r, once, visible

bind = $mainMod+CONTROL, 1, hy3:focustab, index, 01
bind = $mainMod+CONTROL, 2, hy3:focustab, index, 02
bind = $mainMod+CONTROL, 3, hy3:focustab, index, 03
bind = $mainMod+CONTROL, 4, hy3:focustab, index, 04
bind = $mainMod+CONTROL, 5, hy3:focustab, index, 05
bind = $mainMod+CONTROL, 6, hy3:focustab, index, 06
bind = $mainMod+CONTROL, 7, hy3:focustab, index, 07
bind = $mainMod+CONTROL, 8, hy3:focustab, index, 08
bind = $mainMod+CONTROL, 9, hy3:focustab, index, 09
bind = $mainMod+CONTROL, 0, hy3:focustab, index, 10

bind = $mainMod, t, hy3:changegroup, toggletab
bind = $mainMod+SHIFT, t, hy3:setephemeral, false

bind = $mainMod+SHIFT, h, hy3:movewindow, l, once
bind = $mainMod+SHIFT, j, hy3:movewindow, d, once
bind = $mainMod+SHIFT, k, hy3:movewindow, u, once
bind = $mainMod+SHIFT, l, hy3:movewindow, r, once

source = $HOME/.config/hypr/bind.conf

source = $HOME/.config/hypr/windowrules.conf

source = $HOME/.config/hypr/exec-once.conf

I installed the plugin via hyprpm, the wayland version is 1.22.0.

Let me know, if you need any further information. Thanks for looking into this :)

g-regex avatar Jul 04 '24 20:07 g-regex

UPDATE: I have just updated to the now most recent version of Hyprland, namely 0.42.0, but the problem persists.

I also did some further investigation and it seems that the "clicking-through" behaviour only affects Qt GUIs, e.g. Okular, KeepassXC, etc..

Besides that, it is not always the application on the next workspace that receives the click (as I stated earlier), but it is rather the application on the most recently active workspace. E.g. if I have a Qt application open on workspace 10 and I switch directly to workspace 3, then no matter what is on the workspaces in between, clicks on the tab bars on workspace 3 will be sent through to the Qt application on workspace 10.

With this additional information, is anybody able to reproduce this behaviour?

g-regex avatar Aug 11 '24 11:08 g-regex

potentially fixed by e452d045072779c4776b4993cdd09ca1ad094eba

outfoxxed avatar Jan 18 '25 09:01 outfoxxed

Thank you for your reply.

I have just recompiled hyprland and hy3, but unfortunately the problem persists. I have tested the issue as described in my initial post with the Okular PDF reader.

For context, here is the output of hyprctl version:

Hyprland 0.46.2 built from branch  at commit 0bd541f2fd902dbfa04c3ea2ccf679395e316887  (version: bump to 0.46.2).
Date: Thu Dec 19 19:26:47 2024
Tag: v0.46.2, commits: 5566
built against:
 aquamarine 0.5.1
 hyprlang 0.6.0
 hyprutils 0.3.0
 hyprcursor 0.1.11
 hyprgraphics 0.1.1


flags set:
debug

g-regex avatar Jan 19 '25 19:01 g-regex

The commits that potentially fix it are all on -git.

outfoxxed avatar Jan 19 '25 21:01 outfoxxed

Oh, of course. My bad.

I'm on Gentoo, so I cannot install the hy3-git package from the AUR. I tried to build hy3 manually on commits e452d04 and 6870b14, but compilation fails.

I might be missing something obvious, so I include the output here.

Output for 6870b14 (current master):

$ cmake -DCMAKE_BUILD_TYPE=Release -B build
-- The C compiler identification is GNU 14.2.1
-- The CXX compiler identification is GNU 14.2.1
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found PkgConfig: /usr/bin/pkg-config (found version "2.3.0")
-- Checking for modules 'hyprland;pixman-1;libdrm;pango;pangocairo;libinput;wayland-client;xkbcommon'
--   Found hyprland, version 0.46.2
--   Found pixman-1, version 0.44.2
--   Found libdrm, version 2.4.124
--   Found pango, version 1.52.2
--   Found pangocairo, version 1.52.2
--   Found libinput, version 1.27.0
--   Found wayland-client, version 1.23.1
--   Found xkbcommon, version 1.7.0
-- Configuring done (0.8s)
-- Generating done (0.0s)
-- Build files have been written to: /home/x/git/hy3/build
$ cmake -DCMAKE_BUILD_TYPE=Release -B build
[ 11%] Building CXX object CMakeFiles/hy3.dir/src/main.cpp.o
In file included from /home/x/git/hy3/src/Hy3Node.hpp:13,
                 from /home/x/git/hy3/src/Hy3Layout.hpp:32,
                 from /home/x/git/hy3/src/globals.hpp:9,
                 from /home/x/git/hy3/src/main.cpp:9:
/home/x/git/hy3/src/TabGroup.hpp:20:9: error: ‘PHLANIMVAR’ does not name a type
   20 |         PHLANIMVAR<float> focused;
      |         ^~~~~~~~~~
/home/x/git/hy3/src/TabGroup.hpp:21:9: error: ‘PHLANIMVAR’ does not name a type
   21 |         PHLANIMVAR<float> urgent;
      |         ^~~~~~~~~~
/home/x/git/hy3/src/TabGroup.hpp:22:9: error: ‘PHLANIMVAR’ does not name a type
   22 |         PHLANIMVAR<float> offset;       // 0.0-1.0 of total bar
      |         ^~~~~~~~~~
/home/x/git/hy3/src/TabGroup.hpp:23:9: error: ‘PHLANIMVAR’ does not name a type
   23 |         PHLANIMVAR<float> width;        // 0.0-1.0 of total bar
      |         ^~~~~~~~~~
/home/x/git/hy3/src/TabGroup.hpp:24:9: error: ‘PHLANIMVAR’ does not name a type
   24 |         PHLANIMVAR<float> vertical_pos; // 0.0-1.0, user specified direction
      |         ^~~~~~~~~~
/home/x/git/hy3/src/TabGroup.hpp:25:9: error: ‘PHLANIMVAR’ does not name a type
   25 |         PHLANIMVAR<float> fade_opacity; // 0.0-1.0
      |         ^~~~~~~~~~
/home/x/git/hy3/src/TabGroup.hpp:68:9: error: ‘PHLANIMVAR’ does not name a type
   68 |         PHLANIMVAR<float> fade_opacity;
      |         ^~~~~~~~~~
/home/x/git/hy3/src/TabGroup.hpp:89:46: error: expected class-name before ‘{’ token
   89 | class Hy3TabPassElement: public IPassElement {
      |                                              ^
/home/x/git/hy3/src/TabGroup.hpp:93:14: error: ‘void Hy3TabPassElement::draw(const Hyprutils::Math::CRegion&)’ marked ‘override’, but does not override
   93 |         void draw(const CRegion& damage) override;
      |              ^~~~
/home/x/git/hy3/src/TabGroup.hpp:94:14: error: ‘bool Hy3TabPassElement::needsLiveBlur()’ marked ‘override’, but does not override
   94 |         bool needsLiveBlur() override { return false; }
      |              ^~~~~~~~~~~~~
/home/x/git/hy3/src/TabGroup.hpp:95:14: error: ‘bool Hy3TabPassElement::needsPrecomputeBlur()’ marked ‘override’, but does not override
   95 |         bool needsPrecomputeBlur() override { return false; }
      |              ^~~~~~~~~~~~~~~~~~~
/home/x/git/hy3/src/TabGroup.hpp:96:21: error: ‘const char* Hy3TabPassElement::passName()’ marked ‘override’, but does not override
   96 |         const char* passName() override { return "Hy3TabPassElement"; }
      |                     ^~~~~~~~
/home/x/git/hy3/src/TabGroup.hpp:108:9: error: ‘PHLANIMVAR’ does not name a type
  108 |         PHLANIMVAR<Vector2D> pos;
      |         ^~~~~~~~~~
/home/x/git/hy3/src/TabGroup.hpp:109:9: error: ‘PHLANIMVAR’ does not name a type
  109 |         PHLANIMVAR<Vector2D> size;
      |         ^~~~~~~~~~
gmake[2]: *** [CMakeFiles/hy3.dir/build.make:76: CMakeFiles/hy3.dir/src/main.cpp.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/hy3.dir/all] Error 2
gmake: *** [Makefile:136: all] Error 2

g-regex avatar Jan 19 '25 22:01 g-regex

Just to confirm that my setup is correct, I've just built hy3 manually at the hl0.46.0 tag with these commands and that version compiles.

g-regex avatar Jan 19 '25 22:01 g-regex

There have been breaking changes in hyprland's api between 0.46.0 and now. hy3-git requires hyprland-git. (just master on both)

outfoxxed avatar Jan 19 '25 23:01 outfoxxed

Oh, I see. Thanks. Will test this as soon as possible then - probably not before next weekend though.

UPDATE: It seems like that the corresponding package for hyprland-git in gentoo (called hyprland-9999) relies on the user to trace all the dependencies and install them manually. I think it makes more sense for me to wait until the next release and then report back whether I can still observe the issue.

g-regex avatar Jan 20 '25 00:01 g-regex

I finally got to compiling hyprland-0.47.2:

$ hyprctl version
Hyprland 0.47.2 built from branch  at commit 882f7ad7d2bbfc7440d0ccaef93b1cdd78e8e3ff  (version: bump to 0.47.2).
Date: Sun Feb 2 00:47:17 2025
Tag: v0.47.2, commits: 5767
built against:
 aquamarine 0.7.2
 hyprlang 0.6.0
 hyprutils 0.5.0
 hyprcursor 0.1.11
 hyprgraphics 0.1.1

It unfortunatly still has the same issue.

g-regex avatar Feb 18 '25 01:02 g-regex