Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Window focus mode: OSX style #3295

Closed
Hubro opened this issue Jun 23, 2014 · 18 comments
Closed

Window focus mode: OSX style #3295

Hubro opened this issue Jun 23, 2014 · 18 comments

Comments

@Hubro
Copy link
Contributor

Hubro commented Jun 23, 2014

Currently the window focus mode has 3 options - click, sloppy and mouse (the latter two are identical):

screenshot from 2014-06-23 15 46 45

I suggest adding an option for the window focus style that OSX uses. When a window is unfocused, clicking the window only puts it into focus, it doesn't produce a click inside the window. This means that you can't accidentally click a button or a link when you're only trying to bring a window into focus. If you want to click a button in a window that is not in focus, you first have to click anywhere in the window to bring the window into focus, then click the button. There are multiple scenarios where I miss this:

  • I want to focus a full-screened video player, and clicking the video makes it pause. This is also true for maximized YouTube videos.
  • I want to focus a text editor without changing the position of the text cursor.
  • I want to focus a browser window, but the window is full of ads and links that I have to carefully avoid clicking.

This is one of the few things that I miss from my hackintosh days. I'm sure anybody switching to Linux + Cinnamon from OSX would also appreciate this option.

@imarkskinner
Copy link

I don't mean to argue but in the interest of establishing a priority for this, what's wrong with clicking the title bar?

@glebihan
Copy link
Member

That's an interesting idea. I would certainly like that too.
Unfortunately, I don't think this is in our control. I would say it's probably gtk that's in control here.

@Hubro
Copy link
Contributor Author

Hubro commented Jun 24, 2014

@imarkskinner: Full screen applications don't have title bars. Also, in windows like text editors where I just want to focus the window, not changing the text cursor position, having to aim for the slim title bar requires significantly more effort than just casually clicking the window. Additionally, since the title bar is such a small target, it's easy to misclick and hit a window behind it, causing my window to disappear behind a large spreadsheet app, for example (I speak from experience.)

To summarize, I think this style of window focus mode would make for a great additional option, especially for those of us who have used OSX in the past.

@glebihan: I'm pretty sure this could be implemented with a few trivial changes to Muffin and Cinnamon Control Center.

@glebihan
Copy link
Member

@Codemonkey1991: The focus part is muffin's job. Preventing widgets within an unfocused window from receiving input is a completely different story and is normally not the window manager's job.
We're talking about changing the way gtk events are handled here, which is certainly not trivial and would probably have to be done within gtk itself.

@Hubro
Copy link
Contributor Author

Hubro commented Jun 24, 2014

@glebihan: I was hoping that Muffin could prevent its windows from receiving click events.

@mtwebster
Copy link
Member

If i remember from some testing out events in muffin, I think we see the first click on a window, so maybe it would be possible to do something like this. I'll try a few things, but I would be extremely worried about regressions that aren't immediately obvious.

@mtwebster
Copy link
Member

Got something that appears to work:

muffin branch: https://github.com/mtwebster/muffin/tree/osx-focus
cinnamon-desktop branch: https://github.com/mtwebster/cinnamon-desktop/tree/osx-focus

Let me know if this is the idea (I've used a mac for about 10 minutes in my entire life)

And, well, after using it, I'm not sure this shouldn't be normal behavior.

@Hubro
Copy link
Contributor Author

Hubro commented Jun 25, 2014

@mtwebster: Build error:

core/display.c: In function 'event_callback':
core/display.c:2012:53: error: 'C_DESKTOP_FOCUS_MODE_OSX' undeclared (first use in this function)
                 if (meta_prefs_get_focus_mode () == C_DESKTOP_FOCUS_MODE_OSX &&
core/display.c:2012:53: note: each undeclared identifier is reported only once for each function it appears in
Makefile:1168: recipe for target 'display.lo' failed

@Hubro
Copy link
Contributor Author

Hubro commented Jun 25, 2014

@mtwebster: My fault. Got it built and running now, and it appears to work fantastically!

@anandrkris
Copy link

@Hubro Can this be closed if it working as intended? 😄

@Hubro
Copy link
Contributor Author

Hubro commented Aug 6, 2014

@anandrkris The quick solution @mtwebster came up with, combined with this branch of Cinnamon from @RavetcoFX, has worked flawlessly for me for over a month. Should this feature request be closed before any of this has been merged into this repo though?

@anandrkris
Copy link

Thanks for checking. You're right, will need to wait till it is merged into master repo.

@anandrkris
Copy link

@mtwebster - Any plans to merge this for next release and add a new window focus option? Perhaps can be published in segfault (along with any other announcements ) to get it beta tested if you're worried about regressions. Now, what would you call this option? 😉

  • Only Focus on Click
  • Unobtrusive Click
  • Focus without acting
    or just
  • OSX-Focus

Update: Noticed, its nicely called 'Soft' 👍 by @RavetcoFX

@kevlogan90
Copy link

@mtwebster - Was this feature ever added? I don't think I've seen this option, and it isn't available as of Cinnamon 2.6.7. Is there a reason this wasn't added?

@Hubro
Copy link
Contributor Author

Hubro commented Aug 24, 2015

Just a small bump from me. I just went back from i3wm to Cinnamon, and even though I'm using the most recent version available in Debian testing (2.6.13) there's still no soft mouse focus setting :(

2015-08-24 windows 03

If somebody would make a patch to add it to 2.6.13 I would love to resume testing it.

(Otherwise, great to see Cinnamon looking very polished!)

@Hubro
Copy link
Contributor Author

Hubro commented Aug 24, 2015

I should also add, I used this feature for around 6 months after mtwebster implemented it, and it worked absolutely flawlessly.

@NikoKrause
Copy link
Member

Isn't it merged yet?

@Hubro
Copy link
Contributor Author

Hubro commented Feb 7, 2018

@clefebvre What happened?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

10 participants