1. 19 Aug, 2016 2 commits
  2. 18 Aug, 2016 6 commits
    • Martin Flöser's avatar
      Ensure to directly delete old Shadow on update · fe8fc6f8
      Martin Flöser authored
      Summary:
      So far when deleting a Shadow we used deleteLater which caused it
      to be deleted in the next event cycle. This could in worst case result
      in the Shadow being deleted after compositing got suspended. Thus the
      Shadow not getting removed from the DecorationShadowCache which in
      turn would mess up rendering on resume of compositing as the cache
      returns a texture created for a different context.
      
      BUG: 361154
      FIXED-IN: 5.7.4
      
      Reviewers: #kwin, #plasma
      
      Subscribers: kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D2483
      fe8fc6f8
    • Bhushan Shah's avatar
      [platforms/hwcomposer] Set default old brightness to 50% (0x7f) · 88002fcb
      Bhushan Shah authored
      0xff or 100% is too much bright, this happens in first setup.
      
      Reviewed-by: mgraesslin
      88002fcb
    • Martin Flöser's avatar
      [effects] Add new effect for touch point visualization · b7f49244
      Martin Flöser authored
      Summary:
      The new effect is based on the mouse click effect and uses the same
      rendering code (this could be improved by merging them better).
      
      Unlike mouse click there is no keyboard shortcut needed to activate:
      as soon as the effect is loaded all touch points are visualized.
      
      The visualization creates an animated circle for each touch down
      position, motion and up position. The ids are tracked and each touch
      id gets the same color. The first ten different touch ids get a
      different color. As touch ids are stable the first finger will always
      have the same color.
      
      Reviewers: #kwin, #plasma_on_wayland, bshah
      
      Subscribers: plasma-devel, kwin
      
      Tags: #plasma_on_wayland, #kwin
      
      Differential Revision: https://phabricator.kde.org/D2464
      b7f49244
    • Martin Flöser's avatar
      Fix crash when unminizing a ShellClient · a4af2420
      Martin Flöser authored
      On unminize we should not call windowHidden, but windowShown.
      
      Reviewed-By: bshah
      a4af2420
    • Martin Flöser's avatar
      Translate Qt key events through the unicode text with xkbcommon · 9581f23e
      Martin Flöser authored
      Summary:
      KKeyServer does an incorrect translation to keysyms: it always
      translates to the uppercase variant.
      
      This change makes the default go through xkbcommon and tries to get
      the keysym from matching the unicode representation. E.g. an "a" is
      then recognized as the lower case a, and an "A" as the uppercase one.
      
      Only if the translation through text fails we pass back to KKeyServer
      which does a reasonable translation for non-text symbols.
      
      Reviewers: #plasma_on_wayland
      
      Subscribers: plasma-devel, kwin
      
      Tags: #plasma_on_wayland, #kwin
      
      Differential Revision: https://phabricator.kde.org/D2471
      9581f23e
    • Martin Flöser's avatar
      Introduce env variable KWIN_XKB_DEFAULT_KEYMAP to force default layout creation · ea22b8f1
      Martin Flöser authored
      Summary:
      The Xkb class loads keyboard layouts from the users configuration. This
      makes tests fail locally if the user has a layout which behaves
      differently to the one the test expects. E.g. on a German layout the
      right alt key is different to the one of US layout.
      
      In order to have a more stable test base the env variable
      KWIN_XKB_DEFAULT_KEYMAP forces the loading of the default keymap, thus
      tests have a common layout set.
      
      Reviewers: #kwin, #plasma_on_wayland
      
      Subscribers: plasma-devel, kwin
      
      Tags: #plasma_on_wayland, #kwin
      
      Differential Revision: https://phabricator.kde.org/D2466
      ea22b8f1
  3. 17 Aug, 2016 1 commit
    • Bhushan Shah's avatar
      [platforms/hwcomposer] Reset old brightness when turning screen back on · c04e7643
      Bhushan Shah authored
      Summary:
      Now powerdevil can adjust brightness using leds subsystem, however, kwin
      as well sets brightness to 0 for turning off screen and 0xff when
      turning screen back on. This resets the brightness set by the powerdevil
      to 100%.
      
      As a solution now kwin listens to brightnessChanged dbus signal of
      brightnesscontrol and book-keeps the changed brightness, if screen is
      turned off it sets brightness to 0 and when turning screen on, it resets
      to old brightness.
      
      If powermanagement service doesn't appear on dbus by default it restores
      100% brightness.
      
      Test Plan:
      Appearantly this still doesn't work as-it-is on phone, because powerdevil
      doesn't emit brightnessChanged dbus signal because of bug in the driver of
      backlight control, driver doesn't seem to trigger uevents for changes in
      backlight. But with hack in powerdevil to emit brightnessChanged when setting
      brightness, this works
      
      Reviewers: broulik, #plasma_on_wayland, graesslin
      
      Reviewed By: #plasma_on_wayland, graesslin
      
      Subscribers: plasma-devel, kwin
      
      Tags: #plasma_on_wayland, #kwin
      
      Differential Revision: https://phabricator.kde.org/D2468
      c04e7643
  4. 16 Aug, 2016 13 commits
    • Martin Flöser's avatar
      [autotests/integration] Split InternalWindowTest::testKeyboard into two test methods · e40344c6
      Martin Flöser authored
      Creating a dedicated method for the leave event on client.
      This restructuring of the test should hopefully work around the
      failing test condition on build.kde.org.
      e40344c6
    • Martin Flöser's avatar
    • Martin Flöser's avatar
      Add support for touch events in the Effect system · 6af0cc6e
      Martin Flöser authored
      Summary:
      The Effect class is extended by three new virtual methods:
      * touchDown
      * touchMotion
      * touchUp
      
      The methods return a boolean value so that the events can be filtered
      out. E.g. an effect which has also a mouse grab installed wants to
      filter out all events, other effects don't need the events exclusively.
      
      This is a difference to how e.g. keyboard and pointer events are handled.
      But is more close to how KWin's internal input event passing works and
      makes it easier to get touch event: one does not explicitly has to grab
      the events. It's also closer to Wayland where all input events are
      available.
      
      As a first example the Present Windows effect is adjusted and allows to
      activate windows through the touch screen. As much code as possible is
      shared with pointer input.
      
      Reviewers: #kwin, #plasma_on_wayland
      
      Subscribers: plasma-devel, kwin
      
      Tags: #plasma_on_wayland, #kwin
      
      Differential Revision: https://phabricator.kde.org/D2450
      6af0cc6e
    • Martin Flöser's avatar
      [autotests] Use QTR_COMPARE instead of QTest::qWait in TestScriptedEffectLoader · d68a3fec
      Martin Flöser authored
      Hopefully makes the test more reliable on build.kde.org.
      d68a3fec
    • Martin Flöser's avatar
      Support modifier only shortcuts on X11 · 2c333417
      Martin Flöser authored
      Summary:
      With this change KWin/X11 reuses Wayland's modifier only shortcut
      architecture. The XInput2 event filter also listens for
       * XI_RawKeyPress
       * XI_RawKeyRelease
      
      Those events are also reported if another X11 client grabs keyboard
      input. Thus KWin gets all key events, just like on Wayland.
      
      All key events are then sent through the Xkb class which performs the
      mapping from key codes to key syms and is able to detect whether the
      modifier got pressed/released without another key being pressed.
      
      This change will require a few follow up changes, which are required
      also for Wayland:
       * ignore if another input device got interacted (e.g. mouse press,
         touch screen, scroll, etc)
       * use the layout from XServer instead of using our own (needed on
         Wayland in nested setup)
      
      The biggest disadvantage of the change is that it triggers a wake
      up of KWin on every key event. But as KWin already listens to all
      pointer events that's not a big difference and normally a key event
      will wake up the compositor any way.
      
      Reviewers: #plasma
      
      Subscribers: kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D2425
      2c333417
    • Martin Flöser's avatar
      [autotests/integration] More changes in InternalWindowTest::testKeyboard · 1eac18a8
      Martin Flöser authored
      Test is still failing on build.kde.org. Adding more test conditions to
      better understand what works and what doesn't.
      1eac18a8
    • Script Kiddy's avatar
      SVN_SILENT made messages (.desktop file) - always resolve ours · 46691b17
      Script Kiddy authored
      In case of conflict in i18n, keep the version of the branch "ours"
      To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
      46691b17
    • Martin Flöser's avatar
      [autotests/integration] Try to fix InternalWindowTest::testKeyboard · 0eecb202
      Martin Flöser authored
      It fails on build.kde.org, but failing condition is not reproducable
      locally.
      0eecb202
    • Martin Flöser's avatar
      Block modifier only shortcuts when screen is/gets locked · 06d562a5
      Martin Flöser authored
      If the screen is locked the modifier only shortcuts should not trigger.
      Also if the screen gets locked while a modifier is hold the shortcuts
      should not trigger.
      
      Reviewed-By: bshah
      06d562a5
    • Martin Flöser's avatar
      [autotests/integration] Add ScreenLockerWatcher to the Test::lockScreen and ::unlockScreen · ca50a247
      Martin Flöser authored
      This extends the test helper for locking the screen and unlocking the
      screen to also wait for the ScreenLockerWatcher to have that state.
      
      This is going to fail on build.kde.org as we don't have EGL there and
      the greeter crashes. This needs an extension to fake that we have a
      screen lock window.
      ca50a247
    • Martin Flöser's avatar
      Delay query whether screenlocker is registered till WaylandServer is initialized · 697ea3ae
      Martin Flöser authored
      If we try to query before WaylandServer created the KSldApp the service
      owner change is never delivered. Thus a delay till we know that the
      service is there on Wayland. On X11 the initialization can be done
      directly.
      
      To know when the WaylandServer is fully initialized an additional
      signal is added to WaylandServer.
      697ea3ae
    • Martin Flöser's avatar
      [autotests/integration] Test case for screen locked with mod-only-shortcuts · 440d49da
      Martin Flöser authored
      Currently expected failures as modifier only shortcuts don't check
      for locked screen yet.
      440d49da
    • Martin Flöser's avatar
      [wayland] Unset focused keyboard surface when handling key event internally · 4651aa1d
      Martin Flöser authored
      Summary:
      So far when KWin intercepted a key event a leave was not sent to the
      Wayland surface currently having keyboard focus. This could result in
      the Wayland application to start repeating keys. E.g.
      
      1. application gets key press event
      2. This triggers an internal window to show
      3. key release goes to KWin internal window
      4. application starts to repeat key as there is no release
      
      With this change whenever KWin intercepts the key event e.g. due to
       * internal window
       * Effects grabbing key event
       * Tabbox
      
      the focused keyboard surface is set to null, thus triggering a leave
      event and the client not starting to repeat the event.
      
      Reviewers: #kwin, #plasma_on_wayland
      
      Subscribers: plasma-devel, kwin
      
      Tags: #plasma_on_wayland, #kwin
      
      Differential Revision: https://phabricator.kde.org/D2402
      4651aa1d
  5. 15 Aug, 2016 11 commits
    • Martin Flöser's avatar
      Trigger global shortcuts also on key-repeat · 1111b9c9
      Martin Flöser authored
      Summary:
      Restores feature parity with X11. Global shortcuts need to trigger
      also for repeat events. An example is the volume key or screen
      brightness.
      
      For other shortcuts like showing yakuake it does not make sense to
      trigger on repeat. Thus a long term solution is to add a flag to
      global shortcuts whether the key should trigger on repeat.
      
      BUG: 366608
      
      Reviewers: #kwin, #plasma_on_wayland
      
      Subscribers: plasma-devel, kwin
      
      Tags: #plasma_on_wayland, #kwin
      
      Differential Revision: https://phabricator.kde.org/D2413
      1111b9c9
    • Martin Flöser's avatar
      Introduce an EffectsHandler::animationsSupported -> bool · 142aab2e
      Martin Flöser authored
      Summary:
      A new method to tell the effects system whether the compositor scene
      is able to drive animations. E.g. on software emulation (llvmpipe) it's
      better to not do any animations at all.
      
      This information can be used by effects to adjust their behavior, e.g.
      PresentWindows could skip transitions or effects can use it in their
      supported check to completely disable themselves.
      
      As a first step all scripted effects are considered to be unsupported
      if animations are not supported. They inherit AnimationEffect and are
      all about driving animations.
      
      The information whether animations are supported comes from the Scene.
      It's implemented in the following way:
       * XRender: animations are always supported
       * QPainter: animations are never supported
       * OpenGL: animations are supported, except for software emulation
      
      In addition - for easier testing - there is a new env variable
      KWIN_EFFECTS_FORCE_ANIMATIONS to overwrite the selection.
      
      Reviewers: #kwin, #plasma
      
      Subscribers: kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D2386
      142aab2e
    • Martin Flöser's avatar
      [autotests/integration] Fix TestLibinputDevice::testName · bfb2094c
      Martin Flöser authored
      sysName may not be empty. Set a different name.
      bfb2094c
    • Martin Flöser's avatar
      [autotests/libinput] Set a valid sysName by default · a9ac2739
      Martin Flöser authored
      The autotests are failing on build.kde.org due to the generated DBus
      object path not being valid. This might be due to sysName having been
      empty by default.
      a9ac2739
    • Martin Flöser's avatar
      [libinput] Expose all input devices through DBus · ab5d3142
      Martin Flöser authored
      Summary:
      The Connection exposes a new service called org.kde.KWin.InputDevice
      and every Device registers an own object exposing all properties.
      
      This allows an external configuration tool to change the behavior of
      the devices at runtime. E.g. to test configuration settings.
      
      Reviewers: #kwin, #plasma_on_wayland
      
      Subscribers: plasma-devel, kwin
      
      Tags: #plasma_on_wayland, #kwin
      
      Differential Revision: https://phabricator.kde.org/D2407
      ab5d3142
    • Martin Flöser's avatar
      [wayland] Properly implement minimize of ShellClient · 8bbd53a7
      Martin Flöser authored
      Summary:
      We need to call Workspace::clientHidden when minimizing. Otherwise
      Workspace doesn't update the active client and the now minimized
      window is still active.
      
      BUG: 366634
      
      Test Plan:
      Test case works now and also tested in nested setup that
      active window changes.
      
      Reviewers: #kwin, #plasma_on_wayland
      
      Subscribers: plasma-devel, kwin
      
      Tags: #plasma_on_wayland, #kwin
      
      Differential Revision: https://phabricator.kde.org/D2410
      8bbd53a7
    • Martin Flöser's avatar
      Don't trigger modifier only shortcuts if pointer interaction · bd58d779
      Martin Flöser authored
      Summary:
      If the user clicked a pointer button or scrolled a pointer axis the
      held modifier was most likely intended to modify the pointer event.
      Thus the modifier only shortcut should not be triggered.
      
      Reviewers: #kwin, #plasma_on_wayland
      
      Subscribers: plasma-devel, kwin
      
      Tags: #plasma_on_wayland, #kwin
      
      Differential Revision: https://phabricator.kde.org/D2435
      bd58d779
    • Martin Flöser's avatar
      Merge branch 'Plasma/5.7' · 3a730fa5
      Martin Flöser authored
      3a730fa5
    • Martin Flöser's avatar
      Select also raw button press/release in XInput2 based polling · 71c996fe
      Martin Flöser authored
      Summary:
      The mouse polling is also used to detect mouse button press/release
      events. This is used e.g. by the MouseClickEffect. The XInput2 filter
      only selected for Raw Motion events which means mouse button events
      are missed in case it's not combined with a motion.
      
      This change makes the input filter also select for raw button press
      and release events. To support this the X11EventFilter needed to
      be adjusted to support multiple generic event types to filter for.
      
      BUG: 366612
      FIXED-IN: 5.7.4
      
      Reviewers: #kwin, #plasma
      
      Subscribers: kwin
      
      Tags: #kwin
      
      Differential Revision: https://phabricator.kde.org/D2406
      71c996fe
    • Martin Flöser's avatar
      Turn ScreenLockerWatcher into a KWIN_SINGLETON · 490eaadb
      Martin Flöser authored
      It's created together with input, so that the input mechanismn already
      has a way to check whether screen is locked.
      
      Effects doesn't hold a member variable any more and instead uses the
      singleton instance.
      490eaadb
    • Martin Flöser's avatar
      Split ScreenLockerWatcher into dedicated source files · d2a3a108
      Martin Flöser authored
      Being able to monitor whether the screen is locked is useful not only
      to the effects system but overall in KWin. Thus to make it possible to
      use it from more locations as a first step it's moved into dedicated
      source files.
      d2a3a108
  6. 14 Aug, 2016 1 commit
  7. 13 Aug, 2016 3 commits
  8. 12 Aug, 2016 3 commits