Skip to content

Conversation

@plaa
Copy link
Contributor

@plaa plaa commented Dec 24, 2012

This pull request includes two enhancements to the workspace edge flipping functionality:

  1. The mouse pointer moves to the opposite edge of the screen when flipping. This is the natural way for edge flipping, as it emulates a long, continuous desktop.
  2. The edge flip delay is configurable. I was testing using patches against the version of Cinnamon in Linux Mint 14 and was unable to get the GUI settings configuration to display the option. Instead it is configured by the setting org.cinnamon/edge-flip-delay. (You can set it with "gsettings set org.cinnamon edge-flip-delay 100".) The place to add the configuration is in cs_windows.py.

Since edgeFlip.js polls for the mouse pointer hitting the edge of the screen, the logic is the following:

  • poll every edge-flip-delay/2 milliseconds, but at most every 200 ms (to prevent too much power usage on laptops)
  • when the pointer hits the edge, delay edge-flip-delay milliseconds before flipping

@bimsebasse
Copy link
Contributor

Looks great but shouldn't flip delay be set in Cinnamon settings?

(and can we move edge flip stuff to "Workspaces", where it makes sense, instead of "Windows", where it doesn't :o)

@plaa
Copy link
Contributor Author

plaa commented Dec 24, 2012

Like I commented, I was unable to get it added to the settings dialog. It's probably just a few lines copy-pasted from another dialog. I'm testing my changes by applying patches to the Linux Mint 14 version, and it seems that the settings dialogs have been changed since in the repo.

And I agree, workspaces would be a more natural location for these settings, it took me a while to find them.

@dalcde
Copy link
Contributor

dalcde commented Dec 24, 2012

You need the latest git version of Cinnamon. Cinnamon-settings has changed drastically.

@plaa
Copy link
Contributor Author

plaa commented Dec 25, 2012

I know, and I've been developing against the latest git version. However since this is a desktop environment I actually use and I'm interested in just getting a few nagging issues fixed in Cinnamon, I don't want to mess my system up with completely strange versions being installed.

What I've done is the following:

  1. I've fetched the latest git version, and developed the changes against that.
  2. I create a patch of my changes, and apply it against the source code version of the Linux Mint 14 package.
  3. I compile that, install it and test.

Everything else is applied fine. I just tested building directly from the git version and that works fine (when you ignore errors about .dsc file).

However I don't know the settings system, i don't know Python, I don't know what's the proper UI components to use (my instinct would have been to copy the slider from the keyboard settings, but that's a local class of cs_windows.py and all other locations use a number entry), and I don't know the localization system. Therefore I was hoping someone else could have implemented the settings dialog.

This pull request is a functional feature, it just doesn't expose the setting in the UI yet. That can be implemented separately.

My guess for the code (which doesn't work due to the missing class import) is:

    box = IndentedHBox()
    slider = KeyboardRange(_("Edge flip delay:"), _("Short"), _("Long"), 100, 2000, False, "uint", False, "org.cinnamon", "edge-flip-delay", "org.cinnamon/enable-edge-flip", adjustment_step = 10)
    box.pack_start(slider, True, True, 0)
    sidePage.add_widget(box)

I suggest the same Short .. Long range as the edge resistance isn't exactly the millisecond count provided in the setting due to the polling system.

clefebvre added a commit that referenced this pull request Jan 30, 2013
@clefebvre clefebvre merged commit 1aaeee6 into linuxmint:master Jan 30, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants