[PATCH xf86-input-libinput] Initialize variable 'path' to NULL to silence warning
CC libinput.lo libinput.c: In function 'xf86libinput_pre_init': libinput.c:1222:2: warning: 'path' may be used uninitialized in this function [-Wmaybe-uninitialized] free(path); ^ Signed-off-by: Boyan Ding boyan.j.d...@gmail.com --- src/libinput.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libinput.c b/src/libinput.c index 5e616c8..56b93d6 100644 --- a/src/libinput.c +++ b/src/libinput.c @@ -1177,7 +1177,7 @@ xf86libinput_pre_init(InputDriverPtr drv, struct xf86libinput *driver_data = NULL; struct libinput *libinput = NULL; struct libinput_device *device; - char *path; + char *path = NULL; pInfo-type_name = 0; pInfo-device_control = xf86libinput_device_control; -- 2.3.0 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
[PATCH] xwayland: Activate and enable device on first capability reporting
Commit 2172714c changed behavior of capability handling, but it only solved part of the problem. If Xwayland is launched without a capability (e.g. no pointer device is connected when Xwayland was spinned up), and later that capability comes, the device added will not be automatically initialized. This patch initializes the device when the capability is reported for the first time, thus avoiding the problem. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=81819 Signed-off-by: Boyan Ding stu_...@126.com --- hw/xwayland/xwayland-input.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/hw/xwayland/xwayland-input.c b/hw/xwayland/xwayland-input.c index cc5f7df..12c1bbc 100644 --- a/hw/xwayland/xwayland-input.c +++ b/hw/xwayland/xwayland-input.c @@ -496,13 +496,13 @@ seat_handle_capabilities(void *data, struct wl_seat *seat, wl_pointer_add_listener(xwl_seat-wl_pointer, pointer_listener, xwl_seat); -if (xwl_seat-pointer) -EnableDevice(xwl_seat-pointer, TRUE); -else { +if (xwl_seat-pointer == NULL) { xwl_seat_set_cursor(xwl_seat); xwl_seat-pointer = add_device(xwl_seat, xwayland-pointer, xwl_pointer_proc); +ActivateDevice(xwl_seat-pointer, TRUE); } +EnableDevice(xwl_seat-pointer, TRUE); } else if (!(caps WL_SEAT_CAPABILITY_POINTER) xwl_seat-wl_pointer) { wl_pointer_release(xwl_seat-wl_pointer); xwl_seat-wl_pointer = NULL; @@ -516,12 +516,12 @@ seat_handle_capabilities(void *data, struct wl_seat *seat, wl_keyboard_add_listener(xwl_seat-wl_keyboard, keyboard_listener, xwl_seat); -if (xwl_seat-keyboard) -EnableDevice(xwl_seat-keyboard, TRUE); -else { +if (xwl_seat-keyboard == NULL) { xwl_seat-keyboard = add_device(xwl_seat, xwayland-keyboard, xwl_keyboard_proc); +ActivateDevice(xwl_seat-keyboard, TRUE); } +EnableDevice(xwl_seat-keyboard, TRUE); } else if (!(caps WL_SEAT_CAPABILITY_KEYBOARD) xwl_seat-wl_keyboard) { wl_keyboard_release(xwl_seat-wl_keyboard); xwl_seat-wl_keyboard = NULL; -- 2.0.2 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: [PULL] glamor changes for 1.17
Hi, This commit: glamor: Add glamor_program based copy acceleration seems to cause problem with Xwayland with glamor, bug report at https://bugs.freedesktop.org/show_bug.cgi?id=81800 Regards, Boyan Ding On Thu, 2014-07-17 at 18:08 -0700, Eric Anholt wrote: The following changes since commit 55f5bfb578e934319d1308cbb56c900c5ac7cfa7: glamor: Fix temp picture coordinates in glamor_composite_clipped_region (2014-07-17 16:20:12 -0700) are available in the git repository at: git://people.freedesktop.org/~anholt/xserver glamor-next for you to fetch changes up to 6d4954884908ea9894fcfe9836db1ba7bb45be61: Merge remote-tracking branch 'origin/master' into glamor-next (2014-07-17 18:07:26 -0700) Eric Anholt (20): xorg: Remove duplicated definitions of some XV-related structs. kdrive: Do a little more cleanup from the XV struct deduplication. kdrive: Remove dead generic XV adaptors code. kdrive: Simplify the adaptor setup interface. glamor: Split the XV code into XF86-dependent parts and generic. kdrive: Mark XV names const to avoid warnings. ephyr: Add support for XV using glamor. glamor: Share code for put_image handling. xephyr: Allow initializing glamor with gles2 (on GLX). glamor: Drop unnecessary glTexParameteri() in SetSpans(). glamor: Use MIN/MAX macros to clean up glamor_transfer.c glamor: Drop unnecessary glTexParameteri() in upload of texture data. glamor: Drop constant arguments to glamor_solid(). glamor: Remove always-true yInverted flag. glamor: Drop dead get/pub sub pixmap functions. glamor: Drop dead glamor_download_pixmap_to_cpu() glamor: Drop dead glamor_restore_pixmap_to_texture(). glamor: Remove a dead prototype. glamor: Drop the are we doing a series of blits or draws logic. Merge remote-tracking branch 'origin/master' into glamor-next Keith Packard (15): ephyr: Deal with non-root visual for window mi: Create miPolylines as a general-purpose line drawing function mi: Make miPolyArc draw fast zero-width when possible mi: Fill spans for multiple arcs in miPolyFillArc mi: Draw multiple lines in one FillSpans call in miZeroLine glamor: Replace fallback preparation code glamor: Directly reference the private key records glamor: Add glamor_program based copy acceleration glamor: Use glamor_program for glamor_push_pixels glamor: Use glamor_program and GL_LINES for 0-width lines glamor: Add glamor_program based 0-width dashed lines glamor: Add accelerated stipple support glamor: Replace glamor_solid_boxes and glamor_solid with GC using code glamor: Remove 'tiling' shader code glamor: Remove stubbed-out glamor_stipple function glamor/Makefile.am| 15 +- glamor/glamor.c | 49 +- glamor/glamor.h | 23 +- glamor/glamor_copy.c | 693 ++ glamor/glamor_copyarea.c | 626 --- glamor/glamor_copyplane.c | 75 --- glamor/glamor_copywindow.c| 56 --- glamor/glamor_core.c | 202 glamor/glamor_dash.c | 370 ++ glamor/glamor_fill.c | 356 - glamor/glamor_glyphblt.c | 154 +++--- glamor/glamor_glyphs.c| 10 +- glamor/glamor_gradient.c | 19 +- glamor/glamor_largepixmap.c | 13 +- glamor/glamor_lines.c | 187 +++ glamor/glamor_picture.c | 18 - glamor/glamor_pixmap.c| 509 +-- glamor/glamor_points.c| 3 - glamor/glamor_polylines.c | 136 - glamor/glamor_prepare.c | 274 ++ glamor/{glamor_segment.c = glamor_prepare.h} | 40 +- glamor/glamor_priv.h | 251 +- glamor/glamor_program.c | 56 ++- glamor/glamor_program.h | 6 + glamor/glamor_render.c| 89 +--- glamor/glamor_segs.c | 188 +++ glamor/glamor_spans.c | 3 - glamor/glamor_text.c | 6 - glamor/glamor_tile.c | 293 --- glamor/glamor_transfer.c | 48 +- glamor/glamor_transform.c | 72 ++- glamor/glamor_trapezoid.c | 22 +- glamor/glamor_utils.c | 79 +++ glamor/glamor_utils.h | 218
Re: [PATCH] xwayland: Initialize device when reprobing
ping? Any review on this patch? It is really necessary for weston to function well. On Sun, 2014-06-29 at 14:06 +0800, Boyan Ding wrote: Actions like VT switches can somehow make weston reprobe input devices, and cause xwayland create new devices, which, unlike the initial ones, goes uninitialized. This will make xwayland crash when it uses the new devices. This patch activates and enables the devices after they are created thus eliminates the problem. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=79609 Signed-off-by: Boyan Ding stu_...@126.com --- hw/xwayland/xwayland-input.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hw/xwayland/xwayland-input.c b/hw/xwayland/xwayland-input.c index 990cb82..bbd9486 100644 --- a/hw/xwayland/xwayland-input.c +++ b/hw/xwayland/xwayland-input.c @@ -482,6 +482,9 @@ add_device(struct xwl_seat *xwl_seat, dev-type = SLAVE; dev-spriteInfo-spriteOwner = FALSE; +ActivateDevice(dev, FALSE); +EnableDevice(dev, FALSE); + return dev; } ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
[PATCH] xwayland: Initialize device when reprobing
Actions like VT switches can somehow make weston reprobe input devices, and cause xwayland create new devices, which, unlike the initial ones, goes uninitialized. This will make xwayland crash when it uses the new devices. This patch activates and enables the devices after they are created thus eliminates the problem. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=79609 Signed-off-by: Boyan Ding stu_...@126.com --- hw/xwayland/xwayland-input.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hw/xwayland/xwayland-input.c b/hw/xwayland/xwayland-input.c index 990cb82..bbd9486 100644 --- a/hw/xwayland/xwayland-input.c +++ b/hw/xwayland/xwayland-input.c @@ -482,6 +482,9 @@ add_device(struct xwl_seat *xwl_seat, dev-type = SLAVE; dev-spriteInfo-spriteOwner = FALSE; +ActivateDevice(dev, FALSE); +EnableDevice(dev, FALSE); + return dev; } -- 2.0.1 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH] xwayland: Initialize device when reprobing
Hi all, The patch I sent fixed a problem in Xwayland. Please help reviewing it since I'm not very familiar with Xorg code. One more thing. Now that Xwayland has been mainlined, shouldn't we add component xwayland in the bugzilla? Bugs about Xwayland are currently in wayland bugzilla. Thanks, Boyan Ding P.S. I had sent a patch before I subscribed this list and that patch was held back. This patch is the right one and please ignore that one if it eventually comes to the list. ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
[PATCH] xwayland: Initialize device when reprobing
Actions like VT switches can somehow make weston reprobe input devices, and cause xwayland create new devices, which, unlike the initial ones, goes uninitialized. This will make xwayland crash when it uses the new devices. This patch activates and enables the devices that are not CVP or CVK after they are created thus eliminates the problem. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=79609 Signed-off-by: Boyan Ding stu_...@126.com --- hw/xwayland/xwayland-input.c | 8 1 file changed, 8 insertions(+) diff --git a/hw/xwayland/xwayland-input.c b/hw/xwayland/xwayland-input.c index 990cb82..710109e 100644 --- a/hw/xwayland/xwayland-input.c +++ b/hw/xwayland/xwayland-input.c @@ -498,6 +498,10 @@ seat_handle_capabilities(void *data, struct wl_seat *seat, xwl_seat_set_cursor(xwl_seat); xwl_seat-pointer = add_device(xwl_seat, xwayland-pointer, xwl_pointer_proc); +if (xwl_seat-pointer != inputInfo.pointer) { +ActivateDevice(xwl_seat-pointer, TRUE); +EnableDevice(xwl_seat-pointer, TRUE); +} } else if (!(caps WL_SEAT_CAPABILITY_POINTER) xwl_seat-pointer) { wl_pointer_release(xwl_seat-wl_pointer); @@ -511,6 +515,10 @@ seat_handle_capabilities(void *data, struct wl_seat *seat, keyboard_listener, xwl_seat); xwl_seat-keyboard = add_device(xwl_seat, xwayland-keyboard, xwl_keyboard_proc); +if (xwl_seat-keyboard != inputInfo.keyboard) { +ActivateDevice(xwl_seat-keyboard, TRUE); +EnableDevice(xwl_seat-keyboard, TRUE); +} } else if (!(caps WL_SEAT_CAPABILITY_KEYBOARD) xwl_seat-keyboard) { wl_keyboard_release(xwl_seat-wl_keyboard); -- 2.0.1 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH] xwayland: Initialize device when reprobing
Sorry, this patch is sent not the right one, please refer to http://lists.x.org/archives/xorg-devel/2014-June/042924.html instead. Thanks, Boyan Ding On Sat, 2014-06-28 at 16:45 +0800, Boyan Ding wrote: Actions like VT switches can somehow make weston reprobe input devices, and cause xwayland create new devices, which, unlike the initial ones, goes uninitialized. This will make xwayland crash when it uses the new devices. This patch activates and enables the devices that are not CVP or CVK after they are created thus eliminates the problem. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=79609 Signed-off-by: Boyan Ding stu_...@126.com --- hw/xwayland/xwayland-input.c | 8 1 file changed, 8 insertions(+) diff --git a/hw/xwayland/xwayland-input.c b/hw/xwayland/xwayland-input.c index 990cb82..710109e 100644 --- a/hw/xwayland/xwayland-input.c +++ b/hw/xwayland/xwayland-input.c @@ -498,6 +498,10 @@ seat_handle_capabilities(void *data, struct wl_seat *seat, xwl_seat_set_cursor(xwl_seat); xwl_seat-pointer = add_device(xwl_seat, xwayland-pointer, xwl_pointer_proc); +if (xwl_seat-pointer != inputInfo.pointer) { +ActivateDevice(xwl_seat-pointer, TRUE); +EnableDevice(xwl_seat-pointer, TRUE); +} } else if (!(caps WL_SEAT_CAPABILITY_POINTER) xwl_seat-pointer) { wl_pointer_release(xwl_seat-wl_pointer); @@ -511,6 +515,10 @@ seat_handle_capabilities(void *data, struct wl_seat *seat, keyboard_listener, xwl_seat); xwl_seat-keyboard = add_device(xwl_seat, xwayland-keyboard, xwl_keyboard_proc); +if (xwl_seat-keyboard != inputInfo.keyboard) { +ActivateDevice(xwl_seat-keyboard, TRUE); +EnableDevice(xwl_seat-keyboard, TRUE); +} } else if (!(caps WL_SEAT_CAPABILITY_KEYBOARD) xwl_seat-keyboard) { wl_keyboard_release(xwl_seat-wl_keyboard); ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel