1. 27 Oct, 2020 1 commit
    • Aleix Pol Gonzalez's avatar
      daemon: improve consistency of the lid behaviour · 420c60ad
      Aleix Pol Gonzalez authored
      We already had some behaviour for the case where the lid closes, we were
      not applying it when initialising the daemon though, so a laptop would
      start showing the screen to the keyboard until the user takes action.
      
      This change addresses it so that upon initialising we run the same code
      we would run if we closed the lid.
      
      
      (cherry picked from commit deaaa7da)
      420c60ad
  2. 17 Apr, 2020 1 commit
    • Luca Weiss's avatar
      feat(kded): add getAutoRotate method and rename lockAutoRotate · 67980bc2
      Luca Weiss authored
      Summary:
      lockAutoRotate(true) would enable the automatic rotation and
      lockAutoRotate(false) would disable auto rotation which is the opposite
      of what the function name would imply, so rename it to setAutoRotate.
      
      We also need a getter for the value to display the status in the UI.
      This getter checks if all applicable outputs have auto rotate enabled
      and returns that value.
      
      Test Plan: tested on Plasma Mobile
      
      Reviewers: #plasma, bshah, nicolasfella, romangg
      
      Reviewed By: #plasma, bshah, romangg
      
      Subscribers: romangg, nicolasfella, plasma-devel
      
      Tags: #plasma
      
      Differential Revision: https://phabricator.kde.org/D28773
      67980bc2
  3. 22 Mar, 2020 1 commit
  4. 15 Jan, 2020 1 commit
    • Roman Gilg's avatar
      feat(kded): add orientation sensor · 80328814
      Roman Gilg authored
      Summary:
      With this patch KScreen controls rotation of internal outputs if an orientation
      sensor is present and emitting rotation values.
      
      The default behavior is auto-rotation but can be configured through control
      files.
      
      This functionality is developed for the Wayland session but might potentially
      also work on X11, what needs to be tested more.
      
      Test Plan: Screen of convertible with orientation sensor rotates.
      
      Reviewers: #plasma, davidedmundson
      
      Reviewed By: #plasma, davidedmundson
      
      Subscribers: plasma-devel, davidedmundson
      
      Tags: #plasma
      
      Maniphest Tasks: T11475
      
      Differential Revision: https://phabricator.kde.org/D26037
      80328814
  5. 02 Aug, 2019 1 commit
    • Kai Uwe Broulik's avatar
      Improved OSD behavior · 43a62043
      Kai Uwe Broulik authored
      Don't ask the user for a screen configuration on login, instead, apply a sane default.
      When connecting a new screen, apply a default configuration so the user gets immediate
      feedback "something's happening" and then prompt for a configuration via the OSD in case
      the chosen default doesn't fit.
      
      BUG: 398816
      FIXED-IN: 5.17.0
      
      Differential Revision: https://phabricator.kde.org/D22803
      43a62043
  6. 13 Jun, 2019 1 commit
    • Roman Gilg's avatar
      [kded] Introduce Config wrapper class · 9e34fd81
      Roman Gilg authored
      Summary:
      In order to consolidate the code and as a preparatory step for larger changes
      introduce a wrapper class for KScreen::Config types. This class combines
      information about the type and the previously static Serializer methods, such
      that the Serializer class can be removed.
      
      Test Plan: Autotest updated.
      
      Reviewers: #plasma
      
      Subscribers: plasma-devel
      
      Tags: #plasma
      
      Maniphest Tasks: T10028
      
      Differential Revision: https://phabricator.kde.org/D16989
      9e34fd81
  7. 03 Jun, 2019 1 commit
  8. 14 Nov, 2018 2 commits
  9. 25 Aug, 2018 1 commit
    • Kai Uwe Broulik's avatar
      Add applet with screen layouts and presentation mode · b4baa322
      Kai Uwe Broulik authored
      One of LiMux client's requirements is for display configuration to be easily accessible by mouse.
      The OSD cannot be accessed by mouse, so this applet offers commonly used screen layouts in an
      easily accessible place.
      
      To keep the screen on during a presentation (when the application does not do that or the user is
      actually demonstrating something on the machine itself) one needs to uncheck the non-userfriendly
      labeled "Enable powermanagement" check box in the battery monitor. Since this is also affects "screen
      setup", it is placed in this plasmoid as well.
      
      The widget can be placed as an always-visible plasmoid in the panel or in System Tray where it would
      only show if presentation mode is enabled or more then one screen is connected.
      
      Differential Revision: https://phabricator.kde.org/D14855
      b4baa322
  10. 27 Jul, 2018 1 commit
  11. 18 Jul, 2018 1 commit
  12. 09 Jul, 2018 1 commit
  13. 01 Mar, 2018 1 commit
  14. 19 Jan, 2018 1 commit
  15. 14 Dec, 2017 1 commit
  16. 11 Dec, 2017 1 commit
    • Sebastian Kügler's avatar
      add Osd classes · 3a3e60e2
      Sebastian Kügler authored
      Osd represents a single osd dialog.
      OsdManager handles showing them per output.
      
      The content can be loaded from a QML file. It should be reachable via
      DBus, but I haven't tried.
      
      This should also make the osd wayland compatible.
      3a3e60e2
  17. 09 Sep, 2016 1 commit
    • Sebastian Kügler's avatar
      show an OSD on display button press · ad53dc4a
      Sebastian Kügler authored
      Summary:
      Show the plasma OSD with icon "preferences-desktop-display-randr" and
      text when the display button has been pressed.
      
      When only one displays is connected, "No External Display" is connected.
      When more displays are connected, "Changing Screen Layout" is shown.
      
      This is pretty bare-bones, it doesn't show what kind of setup it will
      choose now, or next. This could be done by improving Generator, now,
      however. The problem is that when we're applying a new config, displays
      will flicker due to being mode-set, so the OSD isn't all that useful
      since the screens will settle down.
      It is useful in case of only one screen, since it gives feedback to a
      button that otherwise just appears do nothing.
      
      I think this could be enhanced in the future by giving the opportunity
      to pick a layout. For 5.8, this brings a noticeable improvement and lays
      the base for further work.
      
      Test Plan: manually tested both cases (1 and 2 screens)
      
      Reviewers: #plasma, mart
      
      Reviewed By: mart
      
      Subscribers: graesslin, plasma-devel
      
      Tags: #plasma
      
      Differential Revision: https://phabricator.kde.org/D2718
      ad53dc4a
  18. 03 Aug, 2016 1 commit
    • Sebastian Kügler's avatar
      revert 17199d32 to avoid regression · 31becb3b
      Sebastian Kügler authored
      It seems with the fixed crtc handling, that the setoperation now
      succeeds in critical cases. This patch apparently avoids restoring a
      valid configuration on startup, so let's back it out for now.
      31becb3b
  19. 29 Jul, 2016 1 commit
  20. 01 Jun, 2016 2 commits
    • Sebastian Kügler's avatar
      Use QObject's parent to memory-manage the timers · 13a03dc1
      Sebastian Kügler authored
      Summary: Use QObject's memory management tricks by parenting the timers.
      
      Test Plan: kded5 still works
      
      Reviewers: graesslin
      
      Reviewed By: graesslin
      
      Subscribers: plasma-devel, #plasma
      
      Tags: #plasma
      
      Differential Revision: https://phabricator.kde.org/D1736
      13a03dc1
    • Sebastian Kügler's avatar
      address race condition around setoperation · 17199d32
      Sebastian Kügler authored
      Summary:
      Use a timer to avoid catching configChanged signals after we set
      changes.
      
      The long version:
      
      TL;DR: We have a race condition when the kscreen daemon starts. It looks
      up a known config, then applies it and subsequently resaves the config.
      The same happens on config changes, it writes, then re-reads and then
      re-writes the config change.
      I've managed to prevent this from happening by adding a timer that does
      avoids saving the config as a direct reaction to our own config changes.
      
      So what happens on kded5 startup after loading the kscreen2 module:
      
      - the kscreen config is requested and received
      - the kscreen daemon (KD) looks into its config directory for a suitable
        config file
        (a config file is identified by a combined hash of all screen
      attached, so unique per connected set of outputs)
      - KD usually finds a config
      - KD ignores configChanged events before it starts ...
      - a KScreen::SetConfigOperation to apply the "known config"
      - SetConfigOperation returns after a while (say 100ms later)
      - we re-enable the change monitor
      - we receive a configChanged signal
      - we save the new config (usually to the existing config file)
      
      I don't think this behavior is desirable. I don't see a reason why the
      daemon should save its config right after applying it. I think this
      causes more problems than we want, since the startup may overwrite the
      user's config. This behavior seems to be desired by the code in KD, it's
      already blocking configChanged signals during the SetOperation (which,
      to be honest may result in nightmarish behavior in any way, so it might
      be a kludge which aims too short).
      
      From libkscreen perspective, SetConfigOperation::finished cannot
      guarantee that all configChanged signals are already fired and that it's
      safe to watch for new, independent changes now. At least on X11, we
      simply don't know, and what we can do is wait a bit and cross fingers
      that we're not catching our own noise. The changed signal *may* come
      from a re-request of the edid information, but this is a bit hard to
      track down, and not too useful, anyway, since changed Edid may affect a
      large number of a screen's properties.
      In the Wayland backend, that's a different story and we can prevent this
      behavior at an earlier stage, so this timer is "probably not needed" (I
      haven't tested that).
      
      This effectively prevents KD from catching reactions to its own changes
      and does not trigger saving the config file on every login. It still
      reacts to changes from libkscreen, but will avoid re-saving the config a
      few times. The timer may not be the neatest of solutions for this, but
      it does help narrowing down the problem and may be a last resort action.
      Most importantly, it avoids the re-writing of the config on startup and
      plugging/unplugging a monitor effectively.
      
      The timer value of 100ms is also used in kwin, which should make the
      behavior (which is no problem in kwin) more solid.
      
      CCBUG:346961
      CCBUG:358011
      
      Reviewers: graesslin
      
      Reviewed By: graesslin
      
      Subscribers: plasma-devel, #plasma
      
      Tags: #plasma
      
      Differential Revision: https://phabricator.kde.org/D1730
      17199d32
  21. 05 Mar, 2015 1 commit
  22. 13 Jan, 2015 1 commit
    • Daniel Vrátil's avatar
      Turn on/off laptop screen when lid is opened/closed · 4585ee12
      Daniel Vrátil authored
      KScreen can now handle laptop lid being closed or opened. Once we get the
      isLidClosedChanged signal, we wait for 2 seconds to find out whether it will
      trigger system suspend or not. This is atm the only way how to "detect"
      whether closing lid will suspend the computer or not.
      
      If the we don't get the aboutToSuspend() signal within 2 seconds (an arbitrary
      constant), we save the current config with "_lidOpened" suffix and turn off
      the output.
      
      When we are notified that lid has been opened, we first check whether a config
      file with the same ID, but "_lidOpened" suffix exist, and if it does we use
      it to reconstruct the config prior to closing the lid. If there is no such
      config, we just try to come up with something (applyConfig()).
      
      This is far from perfect (stupid suspend detection, changes made to configs
      while laptop lid is closed will be forgotten once lid is opened again), but
      it works reasonably well.
      
      Plasma still seems to struggle with these complex changes, but that's another
      problem.
      4585ee12
  23. 09 Jan, 2015 2 commits
  24. 19 Nov, 2014 1 commit
  25. 03 Nov, 2014 1 commit
  26. 23 Oct, 2014 1 commit
  27. 09 May, 2014 1 commit
    • Aleix Pol Gonzalez's avatar
      First iteration of the port to KF5 · a561a29a
      Aleix Pol Gonzalez authored
      Disables compilation of the plasmoid (C++ plasmoids are unsupported in KF5)
      and the kcm because does crazy things with the QDeclarativeItems.
      Tests don't pass but Alex promised he'll look at it.
      a561a29a
  28. 04 May, 2014 1 commit
  29. 19 Oct, 2013 3 commits
  30. 18 Oct, 2013 3 commits
  31. 10 Jun, 2013 1 commit
  32. 10 Feb, 2013 1 commit
  33. 14 Jan, 2013 1 commit