Coder Social home page Coder Social logo

[BUG] -click-to-exit not working about rofi HOT 4 OPEN

lbonn avatar lbonn commented on September 15, 2024
[BUG] -click-to-exit not working

from rofi.

Comments (4)

lbonn avatar lbonn commented on September 15, 2024 2

Indeed, that's difficult to implement as is, as pointer events outside of the target surface are not sent by design in wayland.

It could maybe work if we'd reserve a layer covering the complete screen but only show the rofi window in a limited area. This way, we'd get mouse events anywhere. But that sounds a bit hacky and may be tricky with multi-monitors...

Another trick (maybe) would be to add an option to exit on pointer leave (in wl_pointer_listener) and have your compositor focus on click. Also weird

Otherwise, I think it would need some additional supports in protocols or compositor-specific.

I'll leave the bug open in case somebody has a great idea for this.

from rofi.

 avatar commented on September 15, 2024

Another idea (deviates a bit from standard rofi): optionally make the #window clickable, use the mainbox for actual content (that's how I do it to get a nice fullscreen overlay behind the actual "menu")

window:
  background-color: "#YONICE"
  children: "[mainbox]"
  fullscreen: true
  padding: 0 80% 0 0      # <------ use this for positioning instead of rofi's anchors 

mainbox:
  background-color: "#D000D3"
  children: "[this, and, that]"
  expand: true

[...]

from rofi.

Visne avatar Visne commented on September 15, 2024

Wouldn't the best way to do this be to steal the focus and then automatically close rofi when focus is lost (I assume Wayland apps can know that they lost focus)?

from rofi.

Nemo157 avatar Nemo157 commented on September 15, 2024

At least on hyprland it looks like rofi is getting the mouse events always, I guess because it's the only app on the overlay layer.

from rofi.

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.