Giter Site home page Giter Site logo

Comments (4)

mmhobi7 avatar mmhobi7 commented on May 20, 2024 1
    Region region;

    region = XCreateRegion();
    if (region) {
      XShapeCombineRegion(display, window.window, ShapeInput, 0, 0, region,
                          ShapeSet);
      XDestroyRegion(region);
    }

and maybe
wmHint.input = false;

Another solution is to set focus to the window behind glava

from glava.

jarcode-foss avatar jarcode-foss commented on May 20, 2024

After some investigation, I need to use _NET_CLIENT_LIST (EWMH atom) to get a list of windows and then sort through which ones are under GLava, and then perform bounds-checking for the mouse cursor to pass mouse events.

There are some problems with this approach. The primary issue is that I would have to rely on whatever the WM is reporting as a client list, which reportedly omits things like widgets and desktop windows for some WMs, like KDE. This would make it so icons still wouldn't work anyway.

For key events, I simply will not implement any sort of passthrough. Deciding what window to pass key events to is an issue regarding input focus, and GLava should not be able to obtain input focus if it's behaving properly as a widget or desktop window.

For scenarios where a user may want GLava positioned on top of all (or some) windows, rather than the desktop windows and root window, proper and WM-portable mouse event passthrough is simply not possible. I can try to hack together a solution that works for some, but I'm not interested in wasting time on a feature that will break on major WMs.

The core problem here is that the WM should be implementing this behaviour, allowing windows to be classed in such a way that allows the window to ignore mouse input. Unfortunately this kind of behaviour or type isn't specified in EWMH (and even if it were, I'm sure it would only work half the time).

I think what I will attempt sometime is some sort of clickthrough 'bind', where mouse events from glava get forwarded to a specific window that can be configured (ie. identified by class or title). This way I don't have to rely on _NET_CLIENT_LIST.

from glava.

jarcode-foss avatar jarcode-foss commented on May 20, 2024

Reopening since @aaahh has brought up a fix that uses the X11 shape extension to implement this. I will just add this feature by default (no config option) since I can't imagine anyone actually wants GLava to eat input. This will also fix the issue with desktop icons being unclickable under GLava.

from glava.

jarcode-foss avatar jarcode-foss commented on May 20, 2024

"desktop" windows on the current unstable branch have the attempted clickthrough fix. It appears the workaround using the shape extension only works on select WMs (probably has to do with how the WM reparents the window into its own frames).

from glava.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.