Kristian Høgsberg [Mon, 9 Jan 2012 15:42:41 +0000 (10:42 -0500)]
window: Use the window widget instead of adding a window sized widget
Kristian Høgsberg [Mon, 9 Jan 2012 15:34:35 +0000 (10:34 -0500)]
window: Create a widget for the window, drop window motion handler
Kristian Høgsberg [Mon, 9 Jan 2012 14:44:45 +0000 (09:44 -0500)]
window: Convert a few clients to use widget motion handler
Kristian Høgsberg [Mon, 9 Jan 2012 14:36:16 +0000 (09:36 -0500)]
window: Add a widget motion handler
Kristian Høgsberg [Mon, 9 Jan 2012 14:32:07 +0000 (09:32 -0500)]
window: Remove window enter/leave handlers
Kristian Høgsberg [Mon, 9 Jan 2012 14:26:38 +0000 (09:26 -0500)]
dnd: Use a widget for enter/leave handling
Kristian Høgsberg [Mon, 9 Jan 2012 14:22:30 +0000 (09:22 -0500)]
window: Use widget enter/leave handlers for menu
Kristian Høgsberg [Mon, 9 Jan 2012 13:42:24 +0000 (08:42 -0500)]
window: Replace widget focus handler with a enter/leave handler pair
Kristian Høgsberg [Sun, 8 Jan 2012 20:41:52 +0000 (15:41 -0500)]
window: Use display_exit() instead of exit() in window menu
Kristian Høgsberg [Sun, 8 Jan 2012 20:18:19 +0000 (15:18 -0500)]
window: Move widget focus handler to the widget
Kristian Høgsberg [Sun, 8 Jan 2012 20:09:53 +0000 (15:09 -0500)]
window: Rename item to widget
It's a widget.
Kristian Høgsberg [Sat, 7 Jan 2012 02:59:05 +0000 (21:59 -0500)]
window: Add a window menu
At least this gives us a way to close the toy toolkit clients.
Kristian Høgsberg [Fri, 6 Jan 2012 20:24:52 +0000 (15:24 -0500)]
Remove redundant glTexImage2D() call
When we later upload the cursor image with glTexImage2D(), that will unbind
the image just fine. No need for a NULL upload. Except that that doesn't
currently happen with mesa drivers, but the NULL upload is redundant either
way.
Kristian Høgsberg [Fri, 6 Jan 2012 19:37:19 +0000 (14:37 -0500)]
compositor: Damage below before attaching new buffer
Kristian Høgsberg [Thu, 5 Jan 2012 03:19:14 +0000 (22:19 -0500)]
shell: Start implementing the popup surface type
This lands the basic behavior of the popup surface type, but there are still
a number of details to be worked out. Mainly there's a hardcoded timeout
to handle the case of releasing the popup button outside any of the
client windows, which triggers popup_end if it happens after the timeout.
Maybe we just need to add that as an argument, or we could add a new event
that fires in this case to let the client decide whether it ends the popup
or not.
Kristian Høgsberg [Thu, 5 Jan 2012 02:47:30 +0000 (21:47 -0500)]
Move wl_data_device implementation to wayland-server
Kristian Høgsberg [Thu, 5 Jan 2012 02:31:03 +0000 (21:31 -0500)]
Move default grab implementation to wayland-server
Kristian Høgsberg [Thu, 5 Jan 2012 02:30:29 +0000 (21:30 -0500)]
Use new grab api
Rob Bradford [Thu, 5 Jan 2012 15:30:00 +0000 (15:30 +0000)]
compositor: Don't try and destroy old pointer surface if it empty
If attach was called on wl_input_device with a nil buffer twice then the
second call would cause a segfault.
Pekka Paalanen [Thu, 5 Jan 2012 14:41:21 +0000 (16:41 +0200)]
evdev: warn about missing input devices
Usually there should be at least one input device, when Weston starts
up, or is reactivated by a VT switch. Add a nice warning, in case there
are no input devices.
This is to give a clue to users who happen to try Weston on DRM, and
do not get any response.
Add also a message to another failure case, that may lead to missing
input devices.
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
Pekka Paalanen [Thu, 5 Jan 2012 14:28:21 +0000 (16:28 +0200)]
compositor: force fade-in on start
Weston initialises to faded-out state, which means all outputs are just
black, even if they render fine.
Previously the fade-in was triggered probably by some random input
event, since Weston was not guaranteed to wake up. Especially with the
drm backend, and the usual problem of not having permissions to input
devices, Weston would not fade in at all and appear broken.
Force Weston to fade in right after initialisation. This show that at
least rendering works, if it does not respond to any input.
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
Pekka Paalanen [Wed, 4 Jan 2012 12:09:05 +0000 (14:09 +0200)]
shell: free memory on move/resize error paths
Memory leaks noticed by Valgrind, when wl_input_device_update_grab()
fails.
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
Kristian Høgsberg [Wed, 4 Jan 2012 04:24:14 +0000 (23:24 -0500)]
compositor-x11: Just a few more weston renames
Kristian Høgsberg [Wed, 4 Jan 2012 04:00:12 +0000 (23:00 -0500)]
x11: Dont claim the X11 selection when we set the proxy Wayland selection
Kristian Høgsberg [Wed, 4 Jan 2012 03:58:14 +0000 (22:58 -0500)]
data-device: Use a listener list to decouple the x11 selection bridge
Kristian Høgsberg [Wed, 4 Jan 2012 03:55:25 +0000 (22:55 -0500)]
x11: Initialize wm->incr when converting the TARGETS target
Kristian Høgsberg [Wed, 4 Jan 2012 03:53:33 +0000 (22:53 -0500)]
x11: Handle non-existing properties correctly
Don't try to read out ATOM or WINDOW values if there is no such property.
Kristian Høgsberg [Wed, 4 Jan 2012 03:43:36 +0000 (22:43 -0500)]
data-device: Fix a few bugs in the commit to drop ref-counting
Did not test that change.
Kristian Høgsberg [Tue, 3 Jan 2012 19:35:49 +0000 (14:35 -0500)]
More weston rename fixes
Kristian Høgsberg [Tue, 3 Jan 2012 19:11:07 +0000 (14:11 -0500)]
data-device: Handle source going away instead of ref-counting it
We have to deal with the data source going away. Even if we have a
reference to the server side data source, we can't do anything if the
client that provided the source went away. So just NULL the offers
source pointer in the destroy callback for the source.
Kristian Høgsberg [Tue, 3 Jan 2012 16:40:25 +0000 (11:40 -0500)]
Fix a few missing wlsc->weston renames
Kristian Høgsberg [Tue, 3 Jan 2012 16:29:15 +0000 (11:29 -0500)]
Merge remote-tracking branch 'pq/compositor-dtors-v1'
This collided with the big weston rename, but git did a good job of fixing
most cases.
Conflicts:
compositor/compositor.h
src/compositor-x11.c
src/compositor.c
src/screenshooter.c
src/util.c
Kristian Høgsberg [Tue, 3 Jan 2012 16:02:46 +0000 (11:02 -0500)]
Fix distcheck
Kristian Høgsberg [Tue, 3 Jan 2012 15:29:47 +0000 (10:29 -0500)]
Rename wayland-compositor to weston
This rename addresses a few problems around the split between core
Wayland and the wayland-demos repository.
1) Initially, we had one big repository with protocol code, sample
compositor and sample clients. We split that repository to make it
possible to implement the protocol without pulling in the sample/demo
code. At this point, the compositor is more than just a "demo" and
wayland-demos doesn't send the right message. The sample compositor
is a useful, self-contained project in it's own right, and we want to
move away from the "demos" label.
2) Another problem is that the wayland-demos compositor is often
called "the wayland compsitor", but it's really just one possible
compositor. Existing X11 compositors are expected to add Wayland
support and then gradually phase out/modularize the X11 support, for
example. Conversely, it's hard to talk about the wayland-demos
compositor specifically as opposed to, eg, the wayland protocol or a
wayland compositor in general.
We are also renaming the repo to weston, and the compositor
subdirectory to src/, to emphasize that the main "output" is the
compositor.
Pekka Paalanen [Tue, 3 Jan 2012 09:58:34 +0000 (11:58 +0200)]
compositor-x11: improve x11_destroy()
Free many things we were leaking before:
- input device
- EGL resources
- xcb event source
- X Display
Fixes lots of Valgrind leaks.
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
Pekka Paalanen [Tue, 3 Jan 2012 09:51:03 +0000 (11:51 +0200)]
compositor-x11: implement x11_output_destroy()
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
Pekka Paalanen [Tue, 3 Jan 2012 11:27:41 +0000 (13:27 +0200)]
compositor: fix use after free in wlsc_zoom_frame
Add the missing return statement, so the destroyed zoom object is not
used.
Found by Valgrind.
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
Pekka Paalanen [Tue, 3 Jan 2012 09:39:13 +0000 (11:39 +0200)]
compositor: add screenshooter destructor
Nothing was freeing the allocation from screenshooter_create().
Add enough boilerplate, that we can free it. Fixes a Valgrind leak.
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
Pekka Paalanen [Tue, 3 Jan 2012 08:26:03 +0000 (10:26 +0200)]
compositor: remove unused member from wlsc_input_device
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
Pekka Paalanen [Tue, 3 Jan 2012 08:23:24 +0000 (10:23 +0200)]
compositor: free region members on surface destroy
The two pixman regions of struct wlsc_surface were not being freed
properly.
Fixes some Valgrind errors.
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
Pekka Paalanen [Mon, 2 Jan 2012 13:31:01 +0000 (15:31 +0200)]
compositor: add wlsc_input_device_fini()
Add a function for destroying all objects allocated in
wlsc_input_device_init().
This patch depends on "server: add wl_input_device_fini()" commit in the
Wayland core.
Compositor backends could now call wlsc_input_device_fini() to fix some
memory leaks.
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
Pekka Paalanen [Mon, 2 Jan 2012 14:06:56 +0000 (16:06 +0200)]
compositor: more cleanup on shutdown
Free idle_source, shm, and vertices and indices arrays on compositor
shutdown.
Fixes some Valgrind errors.
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
Pekka Paalanen [Mon, 2 Jan 2012 14:03:26 +0000 (16:03 +0200)]
compositor: clean up signal event sources on exit
Fixes some Valgrind errors.
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
Pekka Paalanen [Tue, 3 Jan 2012 08:01:20 +0000 (10:01 +0200)]
compositor: avoid scheduling rendering on shutdown
After the compositor exits the main loop in wl_display_run(), set the
compositor state to SLEEPING. This prevents scheduling repaints, that
will never be executed.
A repaint is scheduled by calling wl_event_loop_add_idle(), which
creates an idle event source. Normally the idle event source object is
destroyed after it has been executed. However, in the shutdown case we
never dispatch events again, and the object is leaked.
This leak is triggered by shell.c destructor, which destroys the
desktop-shell client. Destroying a client ends up calling
wlsc_compositor_schedule_repaint() while destroying the client
resources, especially surfaces.
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
Pekka Paalanen [Mon, 2 Jan 2012 14:00:24 +0000 (16:00 +0200)]
shell: destroy desktop_shell client on exit
If the compositor is shutting down while the desktop_shell still exists,
we leaked some resources by not destroying the client record.
Call wl_client_destroy() on the desktop_shell client, if it exists
during shutdown. Fixes some Valgrind errors.
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
Pekka Paalanen [Mon, 2 Jan 2012 13:47:07 +0000 (15:47 +0200)]
compositor: destroy all input binding objects on shutdown
wlsc_binding_destroy() was not being called at all. Fix the leaks by
introducing a function that destroys a whole list of bindings, instead
of individually saving an extra pointer to the binding object and
calling wlsc_binding_destroy() separately on each.
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
Pekka Paalanen [Mon, 2 Jan 2012 13:42:44 +0000 (15:42 +0200)]
compositor: free regions in wlsc_output_repaint()
Some of the local pixman region objects were not being properly
destroyed before returning from the function. Destroy them, fixes
some Valgrind errors.
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
Pekka Paalanen [Thu, 22 Dec 2011 11:43:43 +0000 (13:43 +0200)]
compositor: add destructors to shell plugins
Add a new wlsc_shell API function for destroying the shell plugin
object. Helps to reduce Valgrind reports.
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
Kristian Høgsberg [Thu, 29 Dec 2011 19:16:42 +0000 (14:16 -0500)]
x11: Clear X11 selection when we can't bridge the data type
Kristian Høgsberg [Thu, 29 Dec 2011 03:51:20 +0000 (22:51 -0500)]
Fix WL_EVENT_WRITEABLE typo
Kristian Høgsberg [Thu, 29 Dec 2011 03:29:23 +0000 (22:29 -0500)]
x11: Bridge Wayland selections to X11 CLIPBOARD selection
This is the other direction. The selection bridge will grab the X11
CLIPBOARD selection on behalf of the Wayland client when it sets the
Wayland selection. Right now only UTF-8 text is supported, but the
data types offered will be taken from the Wayland data source.
Kristian Høgsberg [Thu, 29 Dec 2011 03:04:27 +0000 (22:04 -0500)]
terminal: Don't close fd twice
Kristian Høgsberg [Wed, 28 Dec 2011 04:01:23 +0000 (23:01 -0500)]
x11: Handle BadWindow errors
Kristian Høgsberg [Wed, 28 Dec 2011 03:47:51 +0000 (22:47 -0500)]
x11: Remove destroy listener when X11 window is destroyed
Kristian Høgsberg [Wed, 28 Dec 2011 02:36:41 +0000 (21:36 -0500)]
x11: Store interesting window properties, dump a few more things
Kristian Høgsberg [Wed, 28 Dec 2011 01:20:46 +0000 (20:20 -0500)]
x11: Improvide debugging output a bit
Kristian Høgsberg [Tue, 27 Dec 2011 19:05:36 +0000 (14:05 -0500)]
x11: Remove a couple of done TODOs
Kristian Høgsberg [Tue, 27 Dec 2011 19:02:40 +0000 (14:02 -0500)]
compositor: Pull in hash table from protocol
We use it in the X WM implementation, but we don't want it in the core
libraries.
Kristian Høgsberg [Tue, 27 Dec 2011 18:50:04 +0000 (13:50 -0500)]
x11: Bridge X11 CLIPBOARD selection to Wayland clients
Kristian Høgsberg [Fri, 23 Dec 2011 18:33:45 +0000 (13:33 -0500)]
compositor-x11: Use ARRAY_LENGTH macro from wayland-util.h
Kristian Høgsberg [Thu, 22 Dec 2011 19:43:09 +0000 (14:43 -0500)]
compositor: Handle disappearing surfaces and input devices for touch
Kristian Høgsberg [Thu, 22 Dec 2011 03:54:49 +0000 (22:54 -0500)]
clients: Add simple-touch client for testing touch events.
Kristian Høgsberg [Thu, 22 Dec 2011 03:18:36 +0000 (22:18 -0500)]
evdev: Store positions for all touch points in the evdev device
We need to store all touchpoint positions so that if we just get an
ABS_MT_POSITION_X or Y event, we can pull the other coordinate from the
cache. And we need this across invocations of evdev_input_device_data(),
so the accumulator approach doesn't work.
Instead, we go back to the approach of storing all this state in the
evdev device struct and we might as well just move the rel and abs state
there too.
Kristian Høgsberg [Wed, 21 Dec 2011 22:25:54 +0000 (17:25 -0500)]
compositor: Send touch_up before clearing touch focus
Otherwise it never gets sent.
Kristian Høgsberg [Wed, 21 Dec 2011 22:14:54 +0000 (17:14 -0500)]
window.c: Add touch event stubs
Prevent window.c clients from crashing on touch events.
Kristian Høgsberg [Wed, 21 Dec 2011 22:11:45 +0000 (17:11 -0500)]
window.c: Rename input handlers to input_handle_*
They're event handlers for the input object, not the window object.
Tiago Vignatti [Wed, 21 Dec 2011 17:34:10 +0000 (19:34 +0200)]
compositor: Send out touch events accordingly
Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
Tiago Vignatti [Wed, 21 Dec 2011 17:34:09 +0000 (19:34 +0200)]
evdev: Add ABS_MT_* support for direct touch devices
This adds ABS_MT_* support for direct touch devices and notifies
the compositor. The compositor has a stub for now.
Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
Kristian Høgsberg [Wed, 21 Dec 2011 20:15:08 +0000 (15:15 -0500)]
compositor: Make surface picking not depend on an input device
Pekka Paalanen [Mon, 19 Dec 2011 08:31:45 +0000 (10:31 +0200)]
window: destroy surfaces on display_destroy()
Destroy the window decoration surfaces and pointer surfaces.
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
Pekka Paalanen [Fri, 16 Dec 2011 10:02:09 +0000 (12:02 +0200)]
window: destroy all inputs on display_destroy()
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
Pekka Paalanen [Fri, 16 Dec 2011 09:41:32 +0000 (11:41 +0200)]
window: destroy misc objects on display_destroy()
Windows are supposed to be destroyed by the application explicitly.
Deferred tasks are not supposed to be added after returning from
display_run().
Destroy remaining wl objects (except input related will be in a
following patch).
Close the epoll fd.
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
Pekka Paalanen [Fri, 16 Dec 2011 09:35:34 +0000 (11:35 +0200)]
window: destroy outputs on display_destroy()
This will also start calling the output destroy handlers, if an
application has set any.
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
Pekka Paalanen [Fri, 16 Dec 2011 08:09:29 +0000 (10:09 +0200)]
window: destroy window surfaces and title
Plugs leaks from struct window in window_destroy().
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
Pekka Paalanen [Fri, 16 Dec 2011 08:07:12 +0000 (10:07 +0200)]
window: remove unused struct members
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
Pekka Paalanen [Thu, 15 Dec 2011 13:26:29 +0000 (15:26 +0200)]
resizor: add exit key and cleanups
Make resizor quit when you press Esc key.
Call the toytoolkit cleanup functions, properly destroy window, display
and frame callback.
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
Pekka Paalanen [Thu, 15 Dec 2011 13:20:04 +0000 (15:20 +0200)]
window: add display_destroy()
Add a function to destroy the 'struct display', supposedly with all
contained resources, that are not explicitly created by the application.
The implementation at this time is incomplete. It does clean up the
following:
- xkb structure is freed (needs new libxkbcommon from git)
- EGL resources are freed
- wl_display is flushed and destroyed
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
Pekka Paalanen [Thu, 15 Dec 2011 08:14:07 +0000 (10:14 +0200)]
window: add display_exit()
Add a function, that schedules the display_run() event loop to break
out.
When display_exit() is called, processing continues as usual, until
currently waiting events and deferred tasks have been processed, and
sent requests are flushed. Then, display_run() will return.
This enables toytoolkit apps to handle their exit instead of just being
killed or call exit().
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
Pekka Paalanen [Thu, 15 Dec 2011 08:07:52 +0000 (10:07 +0200)]
simple clients: flush before destroying wl_display
Flush our pending destroy requests to the server before destroying the
wl_display.
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
Pekka Paalanen [Tue, 13 Dec 2011 12:50:25 +0000 (14:50 +0200)]
simple-egl: implement destructors
Destroy all wl objects and call EGL cleanup functions. Reduces leaks
reported by Valgrind considerably, though not to zero.
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
Pekka Paalanen [Tue, 13 Dec 2011 11:48:24 +0000 (13:48 +0200)]
simple-shm: implement destructors
Implement proper destructors that call the wayland destroy functions.
With this and the "client: fix a strdup memory leak" patch in Wayland
core, simple-shm now runs Valgrind-clean (memcheck).
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
Pekka Paalanen [Tue, 13 Dec 2011 10:09:09 +0000 (12:09 +0200)]
simple clients: add signal handler for clean exit
Add signal handler for SIGINT to simple-egl and simple-shm, so they can
be exited voluntarily, without killing them. Later we can add clean-up
code and destructors, and check with valgrind for leaks and errors.
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
Pekka Paalanen [Tue, 20 Dec 2011 14:38:25 +0000 (16:38 +0200)]
compositor: fix uniform handling for fade_output()
fade_output() is strange in that it manufactures a wlsc_surface object
by hand, and then calls wlsc_surface_draw() on it.
Valgrind complained, that wlsc_surface_draw() accesses uninitialised
data: wlsc_surface::alpha. fade_output() forgets to set it.
Initialise surface.alpha in fade_output(). Specifically, set it to
compositor->current_alpha to deliberatly avoid the gluniform1f() call in
wlsc_surface_draw().
fade_output() binds a different GL shader program than
wlsc_surface_draw() expects. This program does not have a uniform called
"alpha", and the uniform location given in glUniform1f() is not for
this program anyway. A hint of that is the runtime error:
Mesa: User error: GL_INVALID_OPERATION in glUniform(type mismatch)
Fixing this seems to get rid of half a thousand of Valgrind errors, and
of course the Mesa user error.
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
Kristian Høgsberg [Mon, 19 Dec 2011 20:40:10 +0000 (15:40 -0500)]
clients: Implement a toy-menu for testing the menu surface type
Kristian Høgsberg [Mon, 19 Dec 2011 20:36:10 +0000 (15:36 -0500)]
resizor: Use symbolic name for BTN_RIGHT
Also, we were actually using BTN_MIDDLE before.
Kristian Høgsberg [Mon, 19 Dec 2011 20:19:54 +0000 (15:19 -0500)]
compositor: Remove shell->activate callback
It's all internal to the shell plugin now.
Kristian Høgsberg [Mon, 19 Dec 2011 20:18:05 +0000 (15:18 -0500)]
compositor: Move click-to-focus and ctrl-alt-bs bindings to shell.c
Kristian Høgsberg [Mon, 19 Dec 2011 20:16:06 +0000 (15:16 -0500)]
compositor: Move binding code to util.c
Kristian Høgsberg [Mon, 19 Dec 2011 19:59:57 +0000 (14:59 -0500)]
compositor: Consolidate code for finding and running bindings
Kristian Høgsberg [Mon, 19 Dec 2011 19:54:11 +0000 (14:54 -0500)]
compositor: Make click to activate behavior a binding
Kristian Høgsberg [Mon, 19 Dec 2011 19:36:50 +0000 (14:36 -0500)]
x11: Ignore FocusOut with mode = NotifyUngrab
Not sure why we get these, but it happens for Alt-click to move a window
(metacity binding) and messes up the idle inhibit counter.
FocusOut event as a result of ungrabbing doesn't really make sense and
fortunately we can safely ignore them.
Pekka Paalanen [Mon, 19 Dec 2011 11:57:59 +0000 (13:57 +0200)]
window: do proper Cairo device flushing
The Cairo documentation tells us to always call cairo_device_flush()
before using other rendering APIs on the cairo surface, especially where
the Cairo device shares state with us (that is, EGL and GL state in this
case).
Add a call to cairo_device_flush() into display_acquire_window_surface(),
which the toytoolkit offers for switching to native (GL) rendering.
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
Tiago Vignatti [Sun, 18 Dec 2011 23:14:03 +0000 (01:14 +0200)]
evdev: new header file for the driver
Besides the new header file, there's also a change in the main evdev creation
procedure for a more suggestive name (evdev_input_add_devices ->
evdev_input_create). There's no real functional changes in this commit.
Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
Tiago Vignatti [Sun, 18 Dec 2011 22:32:48 +0000 (00:32 +0200)]
compositor-drm: remove/add evdev devices when vt switches
Reported-by: Ran Benite <ran234@gmail.com>
Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
Tiago Vignatti [Sun, 18 Dec 2011 22:04:46 +0000 (00:04 +0200)]
compositor: first destroy backend routines and then display
I caught this when an evdev device fd was trying to trigger the main event
loop, which was already free'd and causing an invalid read.
Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
Tiago Vignatti [Sun, 18 Dec 2011 21:52:18 +0000 (23:52 +0200)]
compositor-drm: destroy evdev driver properly when finishing compositor
Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
Tiago Vignatti [Sun, 18 Dec 2011 14:47:15 +0000 (16:47 +0200)]
evdev: use a separate function for adding devices
Adds new function evdev_add_devices for adding udev devices. No
functional changes.
Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
Tiago Vignatti [Sun, 18 Dec 2011 20:27:40 +0000 (22:27 +0200)]
compositor: use wl_list_for_each_safe when destroying output
Was causing an invalid read when the output is in fact destroyed. That's only
visible (segfault on my machine) on drm compositor because it's the only
backend trying to finish correct the compositor.
Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
Juan Zhao [Thu, 15 Dec 2011 16:31:51 +0000 (11:31 -0500)]
Activate toplevel fullscreen and menu surfaces
Activate the toplevel, fullscrren and menu surfaces during mapping,
so that the launched applications can get the keyboard focus without
clicking on that window.
Kristian Høgsberg [Thu, 15 Dec 2011 16:24:25 +0000 (11:24 -0500)]
desktop-shell: Animate surface opacity in zoom animation as well