Waybar icon indicating copy to clipboard operation
Waybar copied to clipboard

Not keen on cursor change

Open Flapper01 opened this issue 1 year ago • 13 comments

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.

Flapper01 avatar May 08 '24 07:05 Flapper01

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.

deathtrip avatar May 08 '24 14:05 deathtrip

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?

ordy avatar May 09 '24 13:05 ordy

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.

haug1 avatar May 09 '24 14:05 haug1

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

v4u6h4n avatar May 09 '24 21:05 v4u6h4n

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.

ronasimi avatar May 10 '24 15:05 ronasimi

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

haug1 avatar May 16 '24 17:05 haug1

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.

deathtrip avatar May 24 '24 14:05 deathtrip

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 avatar May 26 '24 00:05 haug1

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

haug1 avatar May 26 '24 00:05 haug1

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

v4u6h4n avatar May 26 '24 09:05 v4u6h4n

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: @.***>

Flapper01 avatar May 26 '24 16:05 Flapper01

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.

deathtrip avatar Jun 02 '24 22:06 deathtrip

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.

lilydjwg avatar Jun 30 '24 12:06 lilydjwg

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!

v4u6h4n avatar Jun 30 '24 20:06 v4u6h4n