Skip to content

Commits

Permalink
wip/xwayland-p…
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Commits on Sep 13, 2016

  1. xwayland: Add pointer warp emulator

    Emulate pointer warps by locking the pointer and sending relative
    motion events instead of absolute. X will keep track of the "fake"
    pointer cursor position given the relative motion events, and the
    client warping the cursor will warp the faked cursor position.
    
    Various requirements need to be met for the pointer warp emulator to
    enable:
    
    The cursor must be invisible: since it would not be acceptable that a
    fake cursor position would be different from the visual representation
    of the cursor, emulation can only be done when there is no visual
    representation done by the Wayland compositor. Thus, for the emulator
    to enable, the cursor must be hidden, and would the cursor be displayed
    while the emulator is active, the emulator would be destroyed.
    
    The window that is warped within must be likely to have pointer focus.
    For example, warping outside of the window region will be ignored.
    
    The pointer warp emulator will disable itself once the fake cursor
    position leaves the window region, or the cursor is made visible.
    
    This makes various games depending on pointer warping (such as 3D
    first-person shooters and stategy games using click-to-drag-map like
    things) work.
    
    Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
    jadahl committed Sep 13, 2016
    Copy the full SHA
    b88ff74 View commit details
    Browse the repository at this point in the history
  2. xwayland: Translate a pointer grab with confineTo to pointer confinement

    Translate grabbing a pointer device with confineTo set to a window into
    confining the Wayland pointer using the pointer constraints protocol.
    This makes clients that depend on the pointer not going outside of the
    window region, such as certain games and virtual machines viewers, to
    function more properly.
    
    Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
    jadahl committed Sep 13, 2016
    Copy the full SHA
    c6608ab View commit details
    Browse the repository at this point in the history
  3. xwayland: Bind pointer constraints global

    Will be used by the pointer warp emulator.
    
    Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
    jadahl committed Sep 13, 2016
    Copy the full SHA
    6acd4bb View commit details
    Browse the repository at this point in the history
  4. xwayland: Put getting a xwl_window from a Window in a helper

    Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
    jadahl committed Sep 13, 2016
    Copy the full SHA
    69c120f View commit details
    Browse the repository at this point in the history
  5. xwayland: Set unaccelerated pointer motion delta if available

    If there was an relative pointer motion within the same frame as an
    absolute pointer motion, provide both the absolute coordinate and the
    unaccelerated delta when setting the valuator mask.
    
    If a frame contained only a relative motion, queue an absolute motion
    with an unchanged position, but still pass the unaccelerated motion
    event.
    
    If the wl_seat advertised by the compositor is not new enough, assume
    each relative and absolute pointer motion arrives within their own
    separate frames.
    
    Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
    jadahl committed Sep 13, 2016
    Copy the full SHA
    1b68b44 View commit details
    Browse the repository at this point in the history
  6. xwayland: Dispatch pointer motion events on wl_pointer.frame if possible

    Wait until wl_pointer.frame with dispatching the pointer motion event,
    if wl_pointer.frame is supported by the compositor. This will later be
    used to combine unaccelerated motion deltas with the absolute motion
    delta.
    
    Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
    jadahl committed Sep 13, 2016
    Copy the full SHA
    60e8533 View commit details
    Browse the repository at this point in the history
  7. xwayland: Add a new input device used for pointer warping/locking

    Generating relative and absolute movement events from the same input
    device is problematic, because an absolute pointer device doesn't
    expect to see any relative motion events. To be able to generate
    relative pointer motion events including unaccelerated deltas, create a
    secondary pointer device 'xwayland-relative-pointer', and use that for
    emitting relative motion events.
    
    Signed-off-by: Krzysztof Sobiecki <sobkas@gmail.com>
    Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
    sobkas authored and jadahl committed Sep 13, 2016
    Copy the full SHA
    0259da8 View commit details
    Browse the repository at this point in the history
  8. xwayland: Move pointer button initialization into helper

    We'll later use this for initializing buttons for the relative pointer
    since they need to be the same.
    
    Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
    jadahl committed Sep 13, 2016
    Copy the full SHA
    3c8489a View commit details
    Browse the repository at this point in the history
  9. xwayland: Split up device class init/release into functions

    Put device class initialization in init_[device_class](xwl_seat) and
    releasing in release_[device class](xwl_seat). The purpose is to make
    it easier to add more type of initialization here later, without making
    the function too large.
    
    Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
    jadahl committed Sep 13, 2016
    Copy the full SHA
    1e84148 View commit details
    Browse the repository at this point in the history
  10. xwayland: Bind the relative pointer manager

    Will be used for getting unaccelerated motion events and later for
    relative motions used by a pointer warp emulator.
    
    Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
    jadahl committed Sep 13, 2016
    Copy the full SHA
    05c1b59 View commit details
    Browse the repository at this point in the history
  11. Bump ABI versions

    Bump both the xinput and videodrv versions. The xinput due to the added
    valuator mask setter, and videodrv due to the added vfuncs to the
    Screen struct.
    
    Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
    jadahl committed Sep 13, 2016
    Copy the full SHA
    0f24083 View commit details
    Browse the repository at this point in the history

Commits on Sep 8, 2016

  1. dix: Add valuator_mask_set_absolute_unaccelerated

    Add a valuator mask setter for setting absolute coordinate combined
    with unaccelerated motion deltas. This will later be used by Xwayland
    to combine a wl_pointer.motion() event with the unaccelerated delta of
    a wp_relative_pointer.relative_motion() event.
    
    Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
    jadahl committed Sep 8, 2016
    Copy the full SHA
    6776510 View commit details
    Browse the repository at this point in the history
  2. dix: Incroduce CursorConfinedTo vfunc in Screen

    This function will be called when a pointer is grabbed non-root window
    set as the 'confineTo'. This will enable the ddx to handle the
    confinement their own way.
    
    Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
    jadahl committed Sep 8, 2016
    Copy the full SHA
    dcb8db4 View commit details
    Browse the repository at this point in the history

Commits on Sep 6, 2016

  1. dix: Introduce CursorWarpedTo vfunc in Screen

    This new vfunc will be called, if set, after a client has issued a
    WarpPointer request. This is necessary for implementing pointer warp
    emulation in Xwayland.
    
    Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
    jadahl committed Sep 6, 2016
    Copy the full SHA
    3384ad6 View commit details
    Browse the repository at this point in the history
  2. xwayland: Process queued events before making wayland mods effective

    Since xwayland's initial commit we have had a check to not process
    wayland modifier events while one of our surfaces has keyboard focus
    since the normal xkb event processing keeps our internal modifier
    state up to date and if we use the modifiers we get from the
    compositor we mess up that state.
    
    This was slightly changed in commit
    10e9116 to allow the xkb group to be
    set from the wayland event while we have focus in case the compositor
    triggers a group switch.
    
    There's a better solution to the original problem though. Processing
    queued events before overriding the xkb state with the compositor's
    allows those events to be sent properly modified to X clients while
    any further events will be modified with the wayland modifiers as
    intended.
    
    This allows us to fully take in the wayland modifiers, including
    depressed ones, which fixes an issue where we wouldn't be aware of
    already pressed modifiers on enter.
    
    Signed-off-by: Rui Matos <tiagomatos@gmail.com>
    Tested-by: Olivier Fourdan <ofourdan@redhat.com>
    Reviewed-by: Daniel Stone <daniels@collabora.com>
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    rtcm authored and whot committed Sep 6, 2016
    Copy the full SHA
    589f42e View commit details
    Browse the repository at this point in the history

Commits on Sep 2, 2016

  1. test: Run some XTS5 integration tests against Xvfb if possible.

    By default the tests will be skipped.  However, if you set XTEST_DIR
    to the repo of a built X Test Suite and PIGLIT_DIR to a piglit repo
    (no build necessary), make check will run piglit's xts-render tests
    against Xvfb.
    
    We could run more of XTS5, but I haven't spent the time identifying
    what additional subset would be worth running, since much of it is
    only really testing the client libraries.  We want to make sure that
    we keep the runtime down, and this subset of the test suite took 92
    seconds according to piglit.
    
    Reviewed-by: Adam Jackson <ajax@redhat.com>
    anholt authored and nwnk committed Sep 2, 2016
    Copy the full SHA
    deae9c7 View commit details
    Browse the repository at this point in the history
  2. modesetting: add DRI2 page flip support

    Signed-off-by: Qiang Yu <Qiang.Yu@amd.com>
    Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
    yuq authored and nwnk committed Sep 2, 2016
    Copy the full SHA
    f06aef3 View commit details
    Browse the repository at this point in the history
  3. modesetting: move common page flip handle to pageflip.c

    The common page flip handle framework can be shared with DRI2
    page flip.
    
    Signed-off-by: Qiang Yu <Qiang.Yu@amd.com>
    Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
    yuq authored and nwnk committed Sep 2, 2016
    Copy the full SHA
    4a839da View commit details
    Browse the repository at this point in the history
  4. modesetting: move ms_do_pageflip to pageflip.c

    Signed-off-by: Qiang Yu <Qiang.Yu@amd.com>
    Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
    yuq authored and nwnk committed Sep 2, 2016
    Copy the full SHA
    4f1eb78 View commit details
    Browse the repository at this point in the history
  5. modesetting: make ms_do_pageflip generic for share with DRI2

    Signed-off-by: Qiang Yu <Qiang.Yu@amd.com>
    Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
    yuq authored and nwnk committed Sep 2, 2016
    Copy the full SHA
    a586bf9 View commit details
    Browse the repository at this point in the history
  6. dri2: Don't make reference to noClientException

    noClientException is now never filled in with a meaningful value, it's
    always -1. The sole caller of this function disregards the error value
    in any case.
    
    Reviewed-by: Eric Anholt <eric@anholt.net>
    Signed-off-by: Adam Jackson <ajax@redhat.com>
    nwnk committed Sep 2, 2016
    Copy the full SHA
    7d33ab0 View commit details
    Browse the repository at this point in the history
  7. dri3: Don't do return client->noClientException

    Hasn't been necessary since:
    
        commit 92ed75a
        Author: Jamey Sharp <jamey@minilop.net>
        Date:   Mon May 10 20:22:05 2010 -0700
    
            Eliminate boilerplate around client->noClientException.
    
    Reviewed-by: Eric Anholt <eric@anholt.net>
    Signed-off-by: Adam Jackson <ajax@redhat.com>
    nwnk committed Sep 2, 2016
    Copy the full SHA
    dff4355 View commit details
    Browse the repository at this point in the history
  8. sync: Don't do return client->noClientException

    Hasn't been necessary since:
    
        commit 92ed75a
        Author: Jamey Sharp <jamey@minilop.net>
        Date:   Mon May 10 20:22:05 2010 -0700
    
            Eliminate boilerplate around client->noClientException.
    
    Signed-off-by: Adam Jackson <ajax@redhat.com>
    Reviewed-by: Eric Anholt <eric@anholt.net>
    nwnk committed Sep 2, 2016
    Copy the full SHA
    65493c0 View commit details
    Browse the repository at this point in the history
  9. modesetting: Hide cursor when initializing crtc

    When Xorg gets started directly from a wayland-gdm the crtc still has the
    wayland hw cursor set. Combine this with Xorg immediately falling back to
    a sw cursor because a slave-output has a monitor attached at startup; and
    we end up with the wayland hardware cursor overlay fixed in its last
    position + the Xorg sw cursor resulting in 2 cursors.
    
    This commit fixes this by hiding any left-over cursors when initializing
    the crtc.
    
    Signed-off-by: Hans de Goede <hdegoede@redhat.com>
    Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
    jwrdegoede authored and nwnk committed Sep 2, 2016
    Copy the full SHA
    bc3eed3 View commit details
    Browse the repository at this point in the history
  10. modesetting: Do not use function local static variables

    The modesetting driver may be driving 2 screens (slave and master
    gpu), which may have different behavior wrt hardware cursor support.
    
    So stop using static variables and instead store the hw-cursor support
    related data in a per screen struct. While at it actually make it per
    crtc data as in theory different crtc's could have different hw-cursor
    support.
    
    Signed-off-by: Hans de Goede <hdegoede@redhat.com>
    Reviewed-by: Keith Packard <keithp@keithp.com>
    jwrdegoede authored and nwnk committed Sep 2, 2016
    Copy the full SHA
    6c984ac View commit details
    Browse the repository at this point in the history
  11. xi2: fix FocusIn grabs

    Fix a couple of copy-and-paste errors preventing FocusIn grabs from working.
    Perhaps the extension version should be bumped though to distinguish between
    working and non-working extension versions.
    
    Signed-off-by: Michael Thayer <michael.thayer@oracle.com>
    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
    michael-thayer-vb authored and nwnk committed Sep 2, 2016
    Copy the full SHA
    d8c288e View commit details
    Browse the repository at this point in the history

Commits on Aug 23, 2016

  1. xfree86: print the module name together with the load failure message

    We're happily printing the error to stdout but not which module caused it...
    That's in the Xorg.log but that's at least one click away.
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    Reviewed-by: Hans de Goede <hdegoede@redhat.com>
    whot committed Aug 23, 2016
    Copy the full SHA
    25e4f9e View commit details
    Browse the repository at this point in the history
  2. glamor: Declare "pos" in the composite glyph GLSL 1.20 vertex shader

    Fixes shader compile failure:
    
     Failed to compile VS: 0:13(43): error: `pos' undeclared
    0:13(14): error: operands to arithmetic operators must be numeric
    0:13(13): error: operands to arithmetic operators must be numeric
    
     Program source:
    #define ATLAS_DIM_INV 0.000976562500000000
    attribute vec2 primitive;
    attribute vec2 source;
    varying vec2 glyph_pos;
    uniform vec2 fill_offset;
    uniform vec2 fill_size_inv;
    varying vec2 fill_pos;
    uniform vec4 v_matrix;
    void main() {
           gl_Position.xy = primitive.xy * v_matrix.xz + v_matrix.yw;
           gl_Position.zw = vec2(0.0,1.0);
           glyph_pos = source.xy * ATLAS_DIM_INV;
           fill_pos = (fill_offset + primitive.xy + pos) * fill_size_inv;
    }
     (EE) Fatal server error:
     (EE) GLSL compile failure
    
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97300
    Reviewed-by: Keith Packard <keithp@keithp.com>
    Michel Dänzer authored and Michel Dänzer committed Aug 23, 2016
    Copy the full SHA
    be334f4 View commit details
    Browse the repository at this point in the history

Commits on Aug 22, 2016

  1. glamor: Handle bitplane in glamor_copy_fbo_cpu

    This can significantly speed up at least some CopyPlane cases, e.g.
    indirectly for stippled fills.
    
    v2:
    * Make temporary pixmap the same size as the destination pixmap
      (instead of the destination drawable size), and fix coordinate
      parameters passed to fbCopyXtoX and glamor_upload_boxes. Fixes
      incorrect rendering with x11perf -copyplane* and crashes with the
      xscreensaver phosphor hack.
    v3:
    * Make the change a bit more compact and hopefully more readable by
      re-using the existing src_* locals in the bitplane case as well.
    
    Reported-by: Keith Raghubar <keith.raghubar@amd.com>
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
    Acked-by: Eric Anholt <eric@anholt.net>
    Michel Dänzer authored and Michel Dänzer committed Aug 22, 2016
    Copy the full SHA
    cba28d5 View commit details
    Browse the repository at this point in the history

Commits on Aug 19, 2016

  1. wayland: Emulate crossing for native window

    Emitting a LeaveNotify event every time the pointer leaves an X11 window
    may confuse focus follow mouse mode in window managers such as
    mutter/gnome-shell.
    
    Keep the previously found X window and compare against the new one, and
    if they match then it means the pointer has left an Xwayland window for
    a native Wayland surface, only in this case fake the crossing to the
    root window.
    
    Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    ofourdan authored and whot committed Aug 19, 2016
    Copy the full SHA
    6e5bec2 View commit details
    Browse the repository at this point in the history

Commits on Aug 18, 2016

  1. Fix Xorg -configure not working anymore

    Xorg -configure relies on the bus implementation, e.g.
    xf86pciBus.c to call xf86AddBusDeviceToConfigure(). The new
    xf86platformBus code does not have support for this.
    
    Almost all drivers support both the xf86platformBus and xf86pciBus
    nowadays, and the generic xf86Bus xf86CallDriverProbe() function
    prefers the new xf86platformBus probe method when available.
    
    Since the platformBus paths do not call xf86AddBusDeviceToConfigure()
    this results in Xorg -configure failing with the following error:
    "No devices to configure.  Configuration failed.".
    
    Adding support for the xf86Configure code to xf86platformBus.c
    is non trivial and since we advise users to normally run without
    any Xorg.conf at all not worth the trouble.
    
    However some users still want to use Xorg -configure to generate a
    template config file, this commit implements a minimal fix to make
    things work again for PCI devices by skipping the platform
    probe method when xf86DoConfigure is set.
    
    This has been tested on a system with integrated intel graphics,
    with both the intel and modesetting drivers and restores Xorg -configure
    functionality on both cases.
    
    Reviewed-by: Adam Jackson <ajax@redhat.com>
    Signed-off-by: Hans de Goede <hdegoede@redhat.com>
    jwrdegoede authored and nwnk committed Aug 18, 2016
    Copy the full SHA
    48c5c23 View commit details
    Browse the repository at this point in the history

Commits on Aug 17, 2016

  1. test: Remember to swap the window argument to XIQueryPointer

    Before 5c69cb6 this wouldn't matter, because ProcXIQueryPointer
    manually emitted its own error before (bogusly) returning Success to the
    main loop. Since these tests only look at the return value of the
    dispatch function we'd think things succeeded even when we'd generated
    an error.
    
    With that fixed, the test code's failure to swap the window id would
    make dixLookupWindow (rightly) throw BadWindow.
    
    Reviewed-and-Tested-by: Michel Dänzer <michel.daenzer@amd.com>
    Signed-off-by: Adam Jackson <ajax@redhat.com>
    nwnk committed Aug 17, 2016
    Copy the full SHA
    6acd0d0 View commit details
    Browse the repository at this point in the history

Commits on Aug 16, 2016

  1. xinput: Let top-level dispatch generate the error

    ... instead of calling SendErrorToClient ourselves.
    
    Signed-off-by: Adam Jackson <ajax@redhat.com>
    Reviewed-by: Daniel Stone <daniels@collabora.com>
    nwnk committed Aug 16, 2016
    Copy the full SHA
    5c69cb6 View commit details
    Browse the repository at this point in the history
  2. xv: Remove some dumb calls SendErrorToClient

    We already generate errors from the top level when non-Success is
    returned from a dispatch function, so really we were emitting errors
    twice.
    
    Signed-off-by: Adam Jackson <ajax@redhat.com>
    Reviewed-by: Daniel Stone <daniels@collabora.com>
    nwnk committed Aug 16, 2016
    Copy the full SHA
    2f981c0 View commit details
    Browse the repository at this point in the history
  3. xwayland: Fix relinking when dix changes

    Without this a change in eg Xext/ wouldn't relink Xwayland, making you
    wonder why your changes didn't have any effect.
    
    Signed-off-by: Adam Jackson <ajax@redhat.com>
    Reviewed-by: Daniel Stone <daniels@collabora.com>
    nwnk committed Aug 16, 2016
    Copy the full SHA
    0bfa6bf View commit details
    Browse the repository at this point in the history
Older