Alexays / Waybar

Highly customizable Wayland bar for Sway and Wlroots based compositors. :v: :tada:
MIT License
5.83k stars 657 forks source link

Not keen on cursor change #3239

Open Flapper01 opened 1 month ago

Flapper01 commented 1 month ago

Would it be possible to make it optional to change the cursor to indicate module clickability? It seems inconsistent whether or not it changes anyway.

deathtrip commented 1 month ago

I would also like to have an option to disable it. I think most ( if not all ) users know whether a module is clickable or not. It should've been made optional, not forced down users' throat by changing the default behavior, with no option to go back.

ordy commented 1 month ago

The feature was introduced in #3108. Looking at the code, I think that should be possible, would have to introduce a new setting in the config to define if we want static cursors or not, then check for the value before setting the cursor type in AModule

bool AModule::handleMouseEnter(GdkEventCrossing* const& e) {
  if (auto* module = event_box_.get_child(); module != nullptr) {
    module->set_state_flags(Gtk::StateFlags::STATE_FLAG_PRELIGHT);
  }

  if (hasUserEvents_) {
    setCursor(Gdk::HAND2);
  }
  return false;
}

@bananaoomarang @haug1 Mentioning you because you worked on this. Does that sound reasonable to you or is there maybe a better approach?

haug1 commented 1 month ago

Looking at the code, I think that should be possible, would have to introduce a new setting in the config to define if we want static cursors or not, then check for the value before setting the cursor type in AModule

Yeah, it should be easy to hide the cursor effect behind a config flag. And I'm not sure it's necessary to set the cursor on the mouse enter/leave events. I think it can just be configured once in the constructor instead. So that's a welcome change as well, IMO. That will maybe make it work more consistently as well, in reference to OP's comment:

It seems inconsistent whether or not it changes anyway.

v4u6h4n commented 1 month ago

Good to hear that should be possible, kinda makes it look like a webpage lol :-)

ronasimi commented 1 month ago

I get a horizontally flipped cursor in hyprland/workspaces since this was added in #3108. Personally I think this is an unecessary setting but please make it toggle-able.

haug1 commented 1 month ago

I've opened a PR that hides the cursor change behind a config flag and addresses my previous comment.

deathtrip commented 1 month ago

Why close the pull request so early without giving the developer time to look at it? Many pull requests wait longer to get merged. And we need to get this fixed.

haug1 commented 1 month ago

Pretty sure it's been seen. There's been activity on the repository. There are PRs in here from 2020. I don't want to have one of those. Also, I just felt I am not invested enough in this to follow up on feedback or merge conflicts if it will happen now or later on.

haug1 commented 1 month ago

Code is still linked, so if the issue is serious enough, that can help in the future.

v4u6h4n commented 1 month ago

Damn, thats a pity, the hand cursor just makes waybar look so damn janky.

Flapper01 commented 1 month ago

Some of us users clearly think it is serious enough.

On Sunday, 26 May 2024 at 01:57:10 BST, Lars-Ragnar A. Haugen ***@***.***> wrote:  

Code is still linked, so if the issue is serious enough, that can help in the future.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

deathtrip commented 1 month ago

I think it would be a good idea to reopen the pull request, to indicate that the issue hasn't been resolved, and making it more visible to other people, who might want to take a look at it. There's a middle ground between having a 4 year old pull request and closing it after one week.

lilydjwg commented 3 days ago

Seems like this is the right place to comment, so copying my comment elsewhere here:

I don't like this idea [to change cursor to hand]. For native UI widgets, the clickability is often indicated by a slight background change (e.g. buttons, menu items, tabs), or not indicated at all (e.g. menubar, item list).

The hand cursor is an invention of the Web, and not used on native interfaces (except when a hyperlink is indicated). You don't get the hand cursor on your browser's native UI widgets.

I'm going to patch locally to remove the change when it is not configurable.

v4u6h4n commented 2 days ago

I don't like this idea [to change cursor to hand]. For native UI widgets, the clickability is often indicated by a slight background change (e.g. buttons, menu items, tabs), or not indicated at all (e.g. menubar, item list). The hand cursor is an invention of the Web, and not used on native interfaces (except when a hyperlink is indicated). You don't get the hand cursor on your browser's native UI widgets.

Good explanation!