Kristian Høgsberg [Mon, 29 Oct 2012 20:42:26 +0000 (16:42 -0400)]
window: Ignore input_set_pointer_image() if we don't have a pointer
https://bugs.freedesktop.org/show_bug.cgi?id=55782
David Herrmann [Mon, 29 Oct 2012 18:21:16 +0000 (19:21 +0100)]
compositor-drm: prefer PCI boot_vga GPU over other GPUs
If we can find a boot_vga PCI GPU, we should prefer it over any other GPU
that is connected to the system. The boot_vga flag tells us that this GPU
is the primary system GPU.
This fixes problems on two-GPU-systems were the wrong GPU is used. It also
fixes systems were DisplayLink GPUs are available with lower IDs than PCI
GPUs (although, this seems unlikely).
Note that udev_enumerate guarantees that the entry-list is sorted. So for
systems that have platform-GPUs, these should almost always be reported
prior to hotpluggable (PCI, USB, ...) GPUs, as the kernel probes them
first.
https://bugs.freedesktop.org/show_bug.cgi?id=56237
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
Damien Lespiau [Fri, 26 Oct 2012 00:15:44 +0000 (01:15 +0100)]
dnd: Use %zd in the format string for size_t types
len i size_t, so is the result of the sizeof operator.
Kristian Høgsberg [Mon, 29 Oct 2012 18:15:40 +0000 (14:15 -0400)]
compositor-x11: Inherit initial modifier state from XKB
https://bugs.freedesktop.org/show_bug.cgi?id=52419
Tiago Vignatti [Fri, 28 Sep 2012 13:29:47 +0000 (16:29 +0300)]
man: Update XCURSOR_* information a bit
This and the previous patch should fix:
https://bugs.freedesktop.org/show_bug.cgi?id=54598
Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
Tiago Vignatti [Fri, 28 Sep 2012 13:29:46 +0000 (16:29 +0300)]
xwm: Fail safely if cursor is not found
It will use the stock 'x' cursor instead when the system cursors are not
provided.
Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
Kristian Høgsberg [Mon, 29 Oct 2012 17:06:02 +0000 (13:06 -0400)]
configure.ac: Check for libGLU for screensaver
https://bugs.freedesktop.org/show_bug.cgi?id=56376
Pekka Paalanen [Wed, 24 Oct 2012 06:43:10 +0000 (09:43 +0300)]
Add informal notes file
By request on the wayland-devel mailing list, we could start collecting
useful writings here.
However, this is not meant to be a substitute to proper documentation,
though I understand it may very well become one. Better than nothing, I
guess, and hopefully helps in writing real documentation.
Feel free to add stuff.
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
Pekka Paalanen [Wed, 24 Oct 2012 06:43:09 +0000 (09:43 +0300)]
compositor-drm: remove a stale comment
This comment became stale in:
commit
65a11e1039e7ea429ff26bdd0058bdf0efd1df2d
Author: Kristian Høgsberg <krh@bitplanet.net>
Date: Fri Aug 3 11:30:18 2012 -0400
compositor: Accumulate damage per plane
Now it is just misleading. Remove it.
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
Pekka Paalanen [Wed, 24 Oct 2012 06:43:08 +0000 (09:43 +0300)]
desktop-shell: background should be opaque
Toytoolkit does not support setting opaqueness for anything else than
the immediate child widget of the frame widget. Backgrounds do not have
frames, so we need to poke it in manually.
This should allow Weston to paint the background without blending.
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
Pekka Paalanen [Wed, 24 Oct 2012 06:43:07 +0000 (09:43 +0300)]
window: remove window_set_transparent() declaration
The function is not implemented.
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
Pekka Paalanen [Wed, 24 Oct 2012 06:43:06 +0000 (09:43 +0300)]
gles2: check eglBindWaylandDisplayWL return value
If the bind fails, do not bother pretending the EGL Wayland extension
is usable, and no need to unbind, either.
Print some important details about the GLESv2 renderer configuration
into the log.
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
Pekka Paalanen [Wed, 24 Oct 2012 06:43:05 +0000 (09:43 +0300)]
gles2: log EGL config info
Interesting in new environments.
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
Kristian Høgsberg [Tue, 23 Oct 2012 17:04:09 +0000 (13:04 -0400)]
compositor: Clip pointer coordinates on pointer enter as well
When tiling window managers resize a non-resizable window they're violating
ICCCM. Not some hippie-community standard like EWMH, but ICCCM, which is
about as old and sacred as the constitution. If they want to force a window
to be a size it wasn't designed for, at least they could have the decency to
reparent the client window into a bigger containing window of whatever size
they think it should be. But apparently ICCCM compliance is too much to ask.
Anyway, all that just to say that it's really not our fault when we get an
enter event with coordinates outside the valid output region. But we'll
clip it anyway and work around mis-behaving tiling WMs.
Kristian Høgsberg [Mon, 22 Oct 2012 22:50:03 +0000 (18:50 -0400)]
configure.ac: Bump version to 1.0.0
Kristian Høgsberg [Mon, 22 Oct 2012 02:30:26 +0000 (22:30 -0400)]
test-client: Make sure we process pending eevents before we verify state
Since the send-button-state request comes in on one socket and the
wayland event we're looking for comes in on another socket, the order
that we process the two in is undefined. Thus, button-test fails
intermittently, depending on which event we process first.
We change wl_display_flush() to wl_display_roundtrip(), to make sure that
we deal with all wayland events before handling test protocol requests.
Kristian Høgsberg [Sun, 21 Oct 2012 17:29:26 +0000 (13:29 -0400)]
compositor-drm: Disable hw cursor if allocation fails
Instead of crashing later, we can just fall back to gl rendered cursors.
Kristian Høgsberg [Sat, 20 Oct 2012 03:05:37 +0000 (23:05 -0400)]
Define our own container_of as well
Don't rely on libwayland-client/server to define this for us.
Kristian Høgsberg [Fri, 19 Oct 2012 21:12:38 +0000 (17:12 -0400)]
Stop relying on ARRAY_LENGTH being defined in wayland-util.h
Time to break a bad habit.
Jonas Ådahl [Fri, 19 Oct 2012 17:56:02 +0000 (19:56 +0200)]
window: Always pass focused widget to widget motion handlers
Grabbed widgets should always receive motion events as if it was the
widget that would receive it if no grab was active. This means that the
focused widget should always be passed as the widget argument to widget
motion handlers.
This reverts commit
8c9c8fcf6e294f0446446d8e9bdfeb37294743c3.
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Jonas Ådahl [Fri, 19 Oct 2012 06:23:57 +0000 (08:23 +0200)]
window: Don't set pointer image when requesting to move a surface
Since it's the server who moves the surface it's the server who sets the
pointer image.
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Ander Conselvan de Oliveira [Wed, 17 Oct 2012 10:49:08 +0000 (13:49 +0300)]
simple-shm: Don't use ret variable in main() uninitialized
Kristian Høgsberg [Tue, 16 Oct 2012 19:31:31 +0000 (15:31 -0400)]
clients: Don't ask for EGL_PIXMAP_BIT when choosing configs
Kristian Høgsberg [Tue, 16 Oct 2012 17:16:10 +0000 (13:16 -0400)]
clients: Check return value of wl_display_dispatch()
The simple clients all just call wl_display_dispatch() in a while loop
without checking the return value. Now, if the server dies or other
error occurs, we get a -1 return value instead and need to break the loop.
John Kåre Alsaker [Fri, 12 Oct 2012 10:32:03 +0000 (12:32 +0200)]
util: Check result of weston_surface_animation_run.
John Kåre Alsaker [Fri, 12 Oct 2012 10:25:11 +0000 (12:25 +0200)]
compositor-x11: Fix a memory leak.
John Kåre Alsaker [Fri, 12 Oct 2012 10:25:09 +0000 (12:25 +0200)]
compositor: Check if surface creation failed in weston_compositor_fade.
John Kåre Alsaker [Fri, 12 Oct 2012 10:25:07 +0000 (12:25 +0200)]
compositor-x11: Clean up event handling.
John Kåre Alsaker [Fri, 12 Oct 2012 10:25:06 +0000 (12:25 +0200)]
Remove some dead code.
John Kåre Alsaker [Fri, 12 Oct 2012 10:25:05 +0000 (12:25 +0200)]
weston-launch: Check result of pam_start.
Pekka Paalanen [Tue, 16 Oct 2012 14:27:22 +0000 (17:27 +0300)]
configure: build tablet-shell client conditionally
Do not build the tablet-shell client if --disable-tablet-shell is given.
Change --enable-tablet-shell to --disable-tablet-shell in ./configure
--help output, since it is enabled by default. Add a description.
Use proper quoting in the conditional.
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
Pekka Paalanen [Tue, 16 Oct 2012 14:27:21 +0000 (17:27 +0300)]
simple-touch: do not include GL headers
since it doesn't use any of them. Fixes a build failure on systems,
where (E)GL headers are in non-standard path.
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
Pekka Paalanen [Tue, 16 Oct 2012 14:27:20 +0000 (17:27 +0300)]
configure: separate simple EGL clients from others
Separate simple EGL clients from other simple clients. This allows to
build either simple-shm or simple-egl, whichever you want. We avoid
linking libEGL and GLESv2 into simple-shm, and we can build simple-shm
even if nothing provides EGL, GLESv2, or wayland-egl APIs.
Change the options in configure --help from --enable to --disable, since
these are enabled by default, and you would normally only ever give the
--disable flavor. Add descriptions.
Remove the #define BUILD_SIMPLE_CLIENTS since it is not used.
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
Pekka Paalanen [Tue, 16 Oct 2012 14:27:19 +0000 (17:27 +0300)]
toytoolkit: make all EGL code dependant on cairo-egl
configure.ac: The toytoolkit clients used to get libEGL linked to them
even if there was no cairo-egl. This is useless, and actually harmful on
platforms, where libEGL absolutely requires one of the GL ES libraries
to be linked in, too.
Look for EGL-related packages only for cairo-egl with toytoolkit.
window.c: protect all GL header includes with HAVE_CAIRO_EGL, since that
is the only case we can support EGL, GL, or GLESv2 at all. In the case
we do not have cairo-egl, add enough definitions to let us build the
stubs for EGL-related functions.
Remove some #ifdefs that were inside of the same #ifdef already.
These changes allow to build sorfware rendering toytoolkit clients
without any bits of EGL libs or headers.
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
Pekka Paalanen [Tue, 16 Oct 2012 14:27:18 +0000 (17:27 +0300)]
configure: fix --without-cairo-glesv2
Make it do what you would think it does, instead of enabling GLESv2.
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
Pekka Paalanen [Tue, 16 Oct 2012 14:27:17 +0000 (17:27 +0300)]
configure: tell why cairo-egl could not be used
Otherwise the user has no indication which package is missing for
CAIRO_EGL, and has to dig into config.log for it.
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
Pekka Paalanen [Tue, 16 Oct 2012 14:27:16 +0000 (17:27 +0300)]
window: remove dead EGL code
- remove unimplemented function from header
- remove the egl function pointers that were not used
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
Jonas Ådahl [Wed, 3 Oct 2012 20:56:58 +0000 (22:56 +0200)]
evdev: Update axis notifications to follow protocol
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Kristian Høgsberg [Tue, 16 Oct 2012 01:49:23 +0000 (21:49 -0400)]
configure.ac: Bump version to 0.99.0
Kristian Høgsberg [Tue, 16 Oct 2012 01:10:10 +0000 (21:10 -0400)]
Make distcheck pass
Matt Roper [Wed, 10 Oct 2012 23:56:53 +0000 (16:56 -0700)]
compositor: Call into grab handler for touch events
Rather than delivering touch events directly to clients, we'll now
call through the touch grab handler. The default handler (in
wayland-server) will deliver these events the same way they worked
before.
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
Kristian Høgsberg [Mon, 15 Oct 2012 19:01:24 +0000 (15:01 -0400)]
window: Set input region also when we go fullscreen
We used to rely on the compositor resetting this as a side effect of
changing size, but it doesn't work like that any more.
Jonas Ådahl [Thu, 27 Sep 2012 16:40:46 +0000 (18:40 +0200)]
clients: image: Add support for panning and zooming
Support for zooming by using ctrl + the vertical axis (scrolling upwards
zooms in) and panning by both the horizontal and vertical axis as well
as click and drag was added to demonstrate how axis should work.
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Jonas Ådahl [Thu, 27 Sep 2012 16:40:45 +0000 (18:40 +0200)]
window: Update modifier state directly after receiving a modifier event
If the keyboard modifier event was received after the key event the
modifier state would end up incorrect.
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Jonas Ådahl [Thu, 27 Sep 2012 16:40:43 +0000 (18:40 +0200)]
evdev-touchpad: Implement two finger scroll
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Jonas Ådahl [Thu, 27 Sep 2012 16:40:42 +0000 (18:40 +0200)]
shell: Update bindings to conform to pointer axis protocol
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Jonas Ådahl [Thu, 27 Sep 2012 16:40:41 +0000 (18:40 +0200)]
compositor-x11: Update axis notifications to follow protocol
Axis events are in the same coordinate space as motion events, thus
measured in pixels. To emulate axis events for discrete events move the
axis by a number of pixels every step.
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Jonas Ådahl [Thu, 27 Sep 2012 16:40:40 +0000 (18:40 +0200)]
evdev-touchpad: Add a finite-state machine
The finite-state machine is so far used to implement support for tapping
and dragging.
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Jonas Ådahl [Thu, 27 Sep 2012 16:40:39 +0000 (18:40 +0200)]
evdev-touchpad: Cleanup and refactoring
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Pekka Paalanen [Mon, 15 Oct 2012 09:06:53 +0000 (12:06 +0300)]
window: don't call output configure uninitialised
Callbacks registered via display_set_output_configure_handler() are
promised to be called when we know the current mode for the output. If
the following order of events happens:
1. toytoolkit binds to a wl_output global
2. application registers an output configure handler
3. the wl_output.mode events are received
Then in step 2 we would call the callback with uninitialised output
informations, giving it a 0x0 size.
To avoid such race, do not call the callback from
display_set_output_configure_handler() if the output has 0x0 size.
The wl_output.mode event will be received later, and that will trigger
the right call to the callback.
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
Kristian Høgsberg [Mon, 15 Oct 2012 16:56:11 +0000 (12:56 -0400)]
clients: Use wl_display_dispatch_pending()
Kristian Høgsberg [Thu, 11 Oct 2012 14:07:31 +0000 (10:07 -0400)]
tests: Update tests to new APIs
Ander Conselvan de Oliveira [Thu, 11 Oct 2012 11:06:19 +0000 (14:06 +0300)]
compositor: Unmap drag icon surface when its released
libwayland-server was changed to emit the new drag icon signal instead
of faking an attach event with a NULL buffer so this has to be done on
this side.
Pekka Paalanen [Wed, 10 Oct 2012 09:49:32 +0000 (12:49 +0300)]
compositor: fix event-test
event-test assumes, that even without the very first wl_surface.attach
(and commit), the surface will have infinite (previously undef) input
region. event-test simply has test-client to create a wl_surface, and
then it forcefully sets its position and size, and assumes the input
region is now the full surface, so that notify_motion() will hit it.
Change Weston to initialize the input region to infinite, instead of
empty.
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
Pekka Paalanen [Wed, 10 Oct 2012 09:49:31 +0000 (12:49 +0300)]
compositor, clients: apply wl_surface.frame on commit
Apply wl_surface.frame request only on the next wl_surface.commit
according to the new protocol.
This makes it explicit, which repaint actually triggered the frame
callback, since commit schedules a repaint. Otherwise, something causing
a repaint before a commit could trigger the frame callback too early.
Ensure all demo clients send commit after wl_surface.frame. Note, that
GL apps rely on eglSwapBuffers() sending commit. In toytoolkit, it is
assumed that window_flush() always does a commit.
compositor-wayland assumes renderer->repaint_output does a commit.
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
Pekka Paalanen [Wed, 10 Oct 2012 09:49:30 +0000 (12:49 +0300)]
compositor: fix surface pointer cast
In weston, the wl_resource:data field for a wl_surface object always
contains struct weston_surface *, never struct wl_surface *.
Even though this is just a cosmetic fix, it should reduce confusion.
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
Pekka Paalanen [Wed, 10 Oct 2012 09:49:29 +0000 (12:49 +0300)]
shell: do not double-init input region
weston_surface_create() already inits the input region.
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
Pekka Paalanen [Wed, 10 Oct 2012 09:49:28 +0000 (12:49 +0300)]
compositor, clients: double-buffer input region
Make input region double-buffered as specified in the new protocol.
While doing it, get rid of the undef region code, and instead use a
maximum sized real pixman region. This avoids special-casing regions
that might sometimes be undef.
As the input region is now usable by default instead of undef,
weston_surface_update_transform() does not need to reset the input
region anymore.
weston_surface_attach() no longer resets the input region on surface
size change. Therefore, also weston_seat_update_drag_surface() does not
need to reset it.
Update toytoolkit to set input region before calling wl_surface_commit()
or swapBuffers (which does commit).
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
Pekka Paalanen [Wed, 10 Oct 2012 09:49:27 +0000 (12:49 +0300)]
compositor, clients: double-buffer opaque region
Make wl_surface.set_opaque_region double-buffered as required by the new
protocol. Also, do not reset the opaque region on surface size changes
anymore. Only explicit requests from the client will change the region
now.
In clients, make sure commit happens after setting the opaque region.
Mesa does not need a fix, as it never touches the opaque region.
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
Pekka Paalanen [Wed, 10 Oct 2012 09:49:26 +0000 (12:49 +0300)]
shell: do not double-init a region
weston_surface_create() already inits the opaque region, so the second
init in create_black_surface() is logically wrong. Whether this was a
memory leak or not, depends on Pixman internals.
Fini before initing again.
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
Pekka Paalanen [Wed, 10 Oct 2012 09:49:25 +0000 (12:49 +0300)]
compositor, clients: make damage double-buffered
This change depends on the Wayland commit
"protocol: double-buffered state for wl_surface".
Implement double-buffering of damage in the compositor as required by
the new protocol.
Ensure all Weston demo clients call wl_surface_commit() after
wl_surface_damage().
Mesa does not need a fix for this, as the patch adding
wl_surface_commit() call to Mesa already takes care of damage, too;
Mesa commit: "wayland: use wl_surface_commit()"
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
Pekka Paalanen [Wed, 10 Oct 2012 09:49:24 +0000 (12:49 +0300)]
clients: use wl_surface_commit
Use wl_surface_commit() to commit the buffer attach, as Weston now
requires.
NOTE: GL-applications are broken until you upgrade to a version of Mesa
which does wl_surface_commit() on eglSwapBuffers(). If you have
Cairo-gl, this means all toytoolkit apps, too.
simple-shm and simple-touch OTOH will work now.
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
Pekka Paalanen [Wed, 10 Oct 2012 09:49:23 +0000 (12:49 +0300)]
compositor: make wl_surface.attach double-buffered
This change depends on the Wayland commit
"protocol: double-buffered state for wl_surface".
Clients are now required to issue wl_surface.commit for the
wl_surface.attach to take effect.
While changing this, change the surface argument to
weston_surface_attach() from wl_surface into weston_surface, for
consistency.
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
Kristian Høgsberg [Thu, 11 Oct 2012 01:34:26 +0000 (21:34 -0400)]
Update to new fd and wl_registry APIs
This commit updates the clients and the wayland compositor backend to
use the new wl_registry mechanism and the thread safe fd API.
Scott Moreau [Sat, 29 Sep 2012 08:03:11 +0000 (02:03 -0600)]
toytoolkit: Take into account transform when sending output allocation.
Kristian Høgsberg [Wed, 10 Oct 2012 15:41:21 +0000 (11:41 -0400)]
terminal: Don't snap resize if we're maximized
We allow fullscreen to fill the requested size, do the same for maximize.
Kristian Høgsberg [Wed, 10 Oct 2012 15:37:46 +0000 (11:37 -0400)]
terminal: Use window_get_fullscreen() instead of tracking that state manually
Kristian Høgsberg [Wed, 10 Oct 2012 15:36:24 +0000 (11:36 -0400)]
window: Add getters for fullscreen and maximized state
This lets us eliminate a bit of redundancy in the clienst where they track
fullscreen state themselves.
Scott Moreau [Fri, 28 Sep 2012 08:45:06 +0000 (02:45 -0600)]
toytoolkit: Don't draw shadows for maximized windows.
Add THEME_FRAME_MAXIMIZED flag so the theming system can know not to draw
shadows for maximized windows. This allows maximized surfaces' content to be
sized and placed in a more expectable fashion.
John Kåre Alsaker [Thu, 4 Oct 2012 18:42:17 +0000 (20:42 +0200)]
compositor-wayland: Use some nicer border sizes.
John Kåre Alsaker [Thu, 4 Oct 2012 18:42:16 +0000 (20:42 +0200)]
compositor-wayland: Make sure border fields are set before wayland_compositor_create_output and document some function dependencies.
Scott Moreau [Sun, 7 Oct 2012 14:56:30 +0000 (08:56 -0600)]
clients: Set title for all shell surface demos.
Rafal Mielniczuk [Sun, 7 Oct 2012 18:25:36 +0000 (20:25 +0200)]
shell: restore correct layer in shell_unset_fullscreen
This fixes the bug where surface is above panel_layer
just after it is restored from fullscreen mode.
How to reproduce:
* move surface under panel
* set surface fullscreen
* restore surface to normal mode
Rob Bradford [Tue, 9 Oct 2012 17:44:36 +0000 (18:44 +0100)]
backlight: Jump to cleanup code if synthesizing backlight string fails
This applies the same pattern as used in other error cases in this block - and
cleans up the file desciptors and allocated memory too.
Signed-off-by: Rob Bradford <rob@linux.intel.com>
Rob Bradford [Tue, 9 Oct 2012 17:44:35 +0000 (18:44 +0100)]
compositor-drm: Avoid leak during output configuration error path
Signed-off-by: Rob Bradford <rob@linux.intel.com>
Rob Bradford [Tue, 9 Oct 2012 17:44:34 +0000 (18:44 +0100)]
keyboard: Avoid access beyond end off buffer
If the for loop does not match on a button it will fall through and try and
dereference into the array using the terminating value of the loop. This
terminating value of the loop is the dimension of the array and thus beyond
its bounds.
Cc: Jan Arne Petersen <jpetersen@openismus.com>
Signed-off-by: Rob Bradford <rob@linux.intel.com>
Rob Bradford [Tue, 9 Oct 2012 17:44:33 +0000 (18:44 +0100)]
backlight: Avoid buffer overflow in the use of readlink
readlink() returns the number of bytes that it has written excluding any NUL
byte (since it does not write that itself.) This could lead to attempting to
access beyond the end of buffer if the destination of the link is exactly 100
bytes long. The standard solution to this is to subtract one from the buffer
when passing it into readlink().
Signed-off-by: Rob Bradford <rob@linux.intel.com>
Rob Bradford [Tue, 9 Oct 2012 17:44:32 +0000 (18:44 +0100)]
evdev-touchpad: Iterate over the touchpad spec table correctly
The original code would overrun since the calculation of the range did not
take into consideration the size of the entries in the table.
Cc:Jonas Ådahl <jadahl@gmail.com>
Signed-off-by: Rob Bradford <rob@linux.intel.com>
Rob Bradford [Tue, 9 Oct 2012 17:44:31 +0000 (18:44 +0100)]
evdev: Avoid unintended case drop through
e->code is in the same range for ABS_ and for REL_. As the code currently
stands and for the current values in Linux's input.h there is no risk of a
problem. However just in case it would be wise to break after evaluating the
relative events.
Signed-off-by: Rob Bradford <rob@linux.intel.com>
Rob Bradford [Tue, 9 Oct 2012 17:44:30 +0000 (18:44 +0100)]
tty: Log error if we cannot setup a valid tty keyboard mode
The previous logging code would never be reached - this change makes sure a
message is reported if changing keyboard mode to either the desired (K_OFF) or
fallback (K_RAW with handler that drops the events) fails.
Signed-off-by: Rob Bradford <rob@linux.intel.com>
Rob Bradford [Tue, 9 Oct 2012 17:44:29 +0000 (18:44 +0100)]
evdev-touchpad: Twiddle finger_state correctly
The original code always set the finger_state to the appropriate bitmask
irrespective of whether the event was a press or a release. It would also blat
all members of the bitmask rather than ORing in the new bit for the event.
Cc:Jonas Ådahl <jadahl@gmail.com>
Signed-off-by: Rob Bradford <rob@linux.intel.com>
Jonas Ådahl [Mon, 8 Oct 2012 20:49:04 +0000 (22:49 +0200)]
window: Initialize workspace state before first roundtrip
The workspace state parameters were initialized after the first
roundtrip. If a workspace manager state event was received during this
roundtrip the state parameters were cleared leaving an incorrect state.
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
John Kåre Alsaker [Wed, 3 Oct 2012 15:30:05 +0000 (17:30 +0200)]
tests: Remove GLfloat usage.
John Kåre Alsaker [Sun, 30 Sep 2012 00:57:21 +0000 (02:57 +0200)]
weston: Use float instead of GLfloat.
John Kåre Alsaker [Wed, 3 Oct 2012 16:02:22 +0000 (18:02 +0200)]
compositor-wayland: Create border after creating the OpenGL context.
U. Artie Eoff [Mon, 1 Oct 2012 22:21:16 +0000 (15:21 -0700)]
tests: add keyboard test
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
U. Artie Eoff [Fri, 28 Sep 2012 13:39:32 +0000 (06:39 -0700)]
tests: add button test
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
U. Artie Eoff [Fri, 28 Sep 2012 13:39:31 +0000 (06:39 -0700)]
tests: test surface to/from global functions
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
U. Artie Eoff [Fri, 28 Sep 2012 13:39:30 +0000 (06:39 -0700)]
event-test: more aggressive event testing
Test surface pointer enter/leave/motion and surface leave/enter
events more aggressively.
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
U. Artie Eoff [Wed, 3 Oct 2012 04:12:35 +0000 (21:12 -0700)]
desktop-shell: destroy data before exiting.
desktop-shell never returned from display_run() since it
was essentially killed when weston exited. To fix this,
it is necessary to watch for EPOLLHUP in window.c so that
toytoolkit clients will return from display_run() when
weston quits. This allows for clients to clean up
as needed.
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
Rob Bradford [Tue, 2 Oct 2012 17:03:15 +0000 (18:03 +0100)]
simple-shm: Draw the test motif surrounded by a white border
We can then use a wl_surface_damage to just trigger the compositor to update
just a selected region of the buffer and thus test damaging a sub region.
Rob Bradford [Tue, 2 Oct 2012 17:03:14 +0000 (18:03 +0100)]
simple-shm: Don't attach the buffer to the surface for every redraw
This will allow us to change just a sub region of the buffer.
Philipp Brüschweiler [Tue, 2 Oct 2012 09:06:54 +0000 (11:06 +0200)]
editor: more intuitive cursor positioning
Compute the nearest glyph edge instead of taking the one to the
left of the cursor.
Also fixes a segfault when trying to compute the position for an empty
buffer.
Philipp Brüschweiler [Tue, 2 Oct 2012 09:06:53 +0000 (11:06 +0200)]
editor: take text offset into account when computing cursor position
Philipp Brüschweiler [Tue, 2 Oct 2012 09:06:52 +0000 (11:06 +0200)]
editor: make selection a lighter shade of blue, much easier to read
Philipp Brüschweiler [Tue, 2 Oct 2012 09:06:51 +0000 (11:06 +0200)]
editor: fix assert to take preedit string into account
Martin Olsson [Sat, 29 Sep 2012 13:13:56 +0000 (15:13 +0200)]
Fix spelling errors
Tiago Vignatti [Thu, 27 Sep 2012 14:48:37 +0000 (17:48 +0300)]
xwm: Plug kill signal for killing X apps
Xeyes is the counter-example that fails on that heuristic and won't be caught
on kill binding. This and the last two patches should fix:
https://bugs.freedesktop.org/show_bug.cgi?id=53679
Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
Tiago Vignatti [Thu, 27 Sep 2012 14:48:36 +0000 (17:48 +0300)]
compositor: Add kill signal
For now it's being emitted only on the desktop shell kill binding.
Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
Tiago Vignatti [Thu, 27 Sep 2012 14:48:35 +0000 (17:48 +0300)]
shell: Skip clients that we forked ourselves in kill binding
When we fork a client and give one end of a socketpair, the credentials
on the socket fd comes back as ourselves. When that happens, do not kill
the process.
Also remove superfluous variables.
Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>