Neil Roberts [Mon, 23 Jan 2012 19:11:18 +0000 (19:11 +0000)]
window: Fix sending button events when there's no grab
The code which sends the button events was checking whether there is a
focus widget with a button handler but then always sending the button
event to the grab widget. If the grab widget is different from the
focus widget at this point then it will check the wrong widget for a
button handler and potentially crash. It is also possible for there to
be no grab widget here in the following situation:
1. Press and hold down the left mouse button
2. Press and hold down the right mouse button
3. Release the left mouse button
4. Release the right mouse button
In this case the grab will be released at step 3 because the code only
keeps track of the grab for one button. Then it will try to send the
release event for the right mouse button to a NULL widget so it will
crash.
Tiago Vignatti [Fri, 20 Jan 2012 16:47:46 +0000 (18:47 +0200)]
evdev: fix uninitialised pointer value
==30224== Conditional jump or move depends on uninitialised value(s)
==30224== at 0x40EE3A0: evdev_flush_motion (evdev.c:284)
==30224== by 0x40EE6DC: evdev_input_device_data (evdev.c:352)
==30224== by 0x4034710: wl_event_source_fd_dispatch (event-loop.c:76)
==30224== by 0x4035171: wl_event_loop_dispatch (event-loop.c:462)
==30224== by 0x4032F76: wl_display_run (wayland-server.c:785)
==30224== by 0x8050972: main (compositor.c:2183)
Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
Kristian Høgsberg [Thu, 19 Jan 2012 19:05:21 +0000 (14:05 -0500)]
gears: Make window transparent
We need this for the window decorations.
Kristian Høgsberg [Thu, 19 Jan 2012 18:54:09 +0000 (13:54 -0500)]
window: Use CAIRO_OPERATOR_OVER for rendering the menu
We forgot to switch back from CAIRO_OPERATOR_SOURCE, which is broken,
but also hits a broken fallback in cairo-gl.
Kristian Høgsberg [Thu, 19 Jan 2012 18:32:17 +0000 (13:32 -0500)]
configure: Add --enable-setuid-install
This adds support for installing the compositor setuid.
Pekka Paalanen [Thu, 19 Jan 2012 14:48:37 +0000 (16:48 +0200)]
compositor: initialise segv_action.sa_mask
Valgrind complained sa_mask member is not initialised, fix that.
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
Pekka Paalanen [Thu, 19 Jan 2012 14:40:28 +0000 (16:40 +0200)]
desktop-shell: don't crash on menu
Add dummy menu callback function, so we don't crash after every time
someone opens the menu.
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
Pekka Paalanen [Thu, 19 Jan 2012 14:25:40 +0000 (16:25 +0200)]
shell: deal with weston_compositor_pick_surface() = NULL
I could crash Weston by trying to open another menu from a panel while
one menu from it was already showing.
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff40a9872 in popup_grab_focus (grab=0x761968, time=
4130706528, surface=0x0, x=-227, y=15) at shell.c:440
440 if (surface->resource.client == client) {
(gdb) bt
0 0x00007ffff40a9872 in popup_grab_focus (grab=0x761968, time=
4130706528, surface=0x0, x=-227, y=15) at shell.c:440
1 0x0000000000406977 in weston_device_repick (device=0x70b4e0, time=
4130706528) at compositor.c:360
2 0x0000000000406a36 in weston_compositor_repick (compositor=0x619960) at compositor.c:382
3 0x0000000000406ac8 in destroy_surface (resource=0x6fc6f0) at compositor.c:397
4 0x00007ffff7bd33d8 in destroy_resource (element=0x6fc6f0, data=0x7fffffffd9fc) at wayland-server.c:355
5 0x00007ffff7bd8d98 in for_each_helper (entries=0x757808, func=0x7ffff7bd332c <destroy_resource>, data=0x7fffffffd9fc)
at wayland-util.c:264
6 0x00007ffff7bd8dd4 in wl_map_for_each (map=0x757808, func=0x7ffff7bd332c <destroy_resource>, data=0x7fffffffd9fc)
at wayland-util.c:270
7 0x00007ffff7bd34dc in wl_client_destroy (client=0x7577d0) at wayland-server.c:385
8 0x00007ffff7bd2e36 in wl_client_connection_data (fd=17, mask=1, data=0x7577d0) at wayland-server.c:187
9 0x00007ffff7bd5bde in wl_event_source_fd_dispatch (source=0x74cda0, ep=0x7fffffffdae0) at event-loop.c:76
10 0x00007ffff7bd665b in wl_event_loop_dispatch (loop=0x618900, timeout=-1) at event-loop.c:462
11 0x00007ffff7bd42a9 in wl_display_run (display=0x6188b0) at wayland-server.c:785
12 0x000000000040b1e1 in main (argc=1, argv=0x7fffffffdef8) at compositor.c:2182
Modify popup_grab_focus() to deal with a NULL surface.
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
Pekka Paalanen [Thu, 19 Jan 2012 13:17:59 +0000 (15:17 +0200)]
window: menu leak fixes
When a menu self-destructs, free also the widget and struct menu.
As menus are self-destructing, it does not make sense to store the
window pointer, since we cannot clear it automatically. Therefore,
rename window_create_menu() to window_show_menu() that does not return
the window pointer. It also calls window_schedule_redraw() internally.
Fixes Valgrind reported memory leaks.
The alternative would be to explicitly destroy the menu in application's
menu callback.
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
Pekka Paalanen [Thu, 19 Jan 2012 12:21:35 +0000 (14:21 +0200)]
resizor: free the widget on destroy
Plugs a memory leak.
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
Pekka Paalanen [Thu, 19 Jan 2012 11:51:38 +0000 (13:51 +0200)]
window: remove pointers to widget on destroy
Input devices may hold a pointer to the widget being destroyed. Reset
such pointers in widget_destroy().
This fixes a use-after-free in window_destroy(), if an application
destroys its widgets before the window.
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
Pekka Paalanen [Thu, 19 Jan 2012 11:33:50 +0000 (13:33 +0200)]
window: destroy frame in window_destroy()
Fix a memory leak reported by Valgrind, by destroying the window
decorations widget, if it exists.
All widget pointers returned from toytoolkit to the application should
be destroyed by the application explicitly.
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
Kristian Høgsberg [Thu, 19 Jan 2012 02:41:37 +0000 (21:41 -0500)]
compositor: Flush surface damage to surface below on destroy
When we destroy a surface, we damage the surface below so that the area
exposed by the disappearing surface will be repainted. However, if that
surface also is destroyed, the damage information is lost and we fail to
repaint that area.
This commit introduces weston_surface_flush_damage(), which flushes the
surface damage the the surface below when a surface is destroyed. When
multiple surfaces are destroyed at the same time, the damage now accumulates
and sinks down through the surface stack as it should.
Kristian Høgsberg [Wed, 18 Jan 2012 20:11:07 +0000 (15:11 -0500)]
drm: Don't print warning if cursor stride isn't right
gbm_bo_create_from_egl_image() should catch this based on the
GBM_BO_USE_CURSOR_64X64 flag. It currently doesn't so we end up with
a cursor buffer with invalid stride.
Kristian Høgsberg [Wed, 18 Jan 2012 19:50:58 +0000 (14:50 -0500)]
clients: Allow compiling with the cairo glesv2 backend
This disables gears and wscreensaver, which use full GL.
Pekka Paalanen [Wed, 18 Jan 2012 14:51:30 +0000 (16:51 +0200)]
desktop-shell: fix the unlock dialog decorations
The decorations were not responding, could not move or resize the
dialog, and it painted with a black shade.
When the dialog is created, schedule a resize instead of a repaint. The
resize will initialise the widget tree, and let everything draw and work
as it should.
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
Kristian Høgsberg [Wed, 18 Jan 2012 17:42:16 +0000 (12:42 -0500)]
tty: Use SIGUSR1 for both enter and leave signals
Now that we track has_vt, we can use the same handler for both enter and leave.
Kristian Høgsberg [Wed, 18 Jan 2012 17:38:33 +0000 (12:38 -0500)]
tty: Switch back to launch tty if we switched away
Kristian Høgsberg [Wed, 18 Jan 2012 16:50:31 +0000 (11:50 -0500)]
drm: Cancel any scheduled repaints in the leave vt handler
If we don't cancel the repaint, we end up pointlessly redrawing the output.
What's worse is that pageflipping to the new buffer eventually fails and
we miss the finish_frame callback, leaving the compositor stuck when we
re-enter the vt.
Kristian Høgsberg [Wed, 18 Jan 2012 16:48:46 +0000 (11:48 -0500)]
drm: Reset kms mode on vt enter
Normally the repaint will trigger a pageflip, which flips back to our
fb, but that doesn't work if the kms output has been turned off or
set to a different mode.
Kristian Høgsberg [Wed, 18 Jan 2012 16:47:41 +0000 (11:47 -0500)]
drm: Complain if pageflip fails
We still don't handle the error in any way, but there's not much we can do.
It's typically a case of not having drm master."
Kristian Høgsberg [Tue, 17 Jan 2012 16:07:42 +0000 (11:07 -0500)]
shell: Set desktop-shell deathstamp at initial launch
Timestamp 0 is a valid timestamp and we can't use that as an uninitialized
timestamp.
Pekka Paalanen [Tue, 17 Jan 2012 14:10:41 +0000 (16:10 +0200)]
wscreensaver: get decorations back
In the great toytoolkit widget revolution, wscreensaver demo mode lost
its window decorations. Bring them back.
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
Pekka Paalanen [Tue, 17 Jan 2012 12:36:27 +0000 (14:36 +0200)]
shell: respawn desktop-shell if it dies
If the desktop-shell client goes away for any reason, respawn it. To
avoid harmful looping, limit the respawning to 5 times within 30
seconds, and then give up.
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
Kristian Høgsberg [Tue, 17 Jan 2012 03:42:22 +0000 (22:42 -0500)]
tty: Open a new vt if not running on a VT
This is typically when launcing from a pty such as an X (or Wayland)
terminal or from an ssh session. Opening a new vt typically requires root
priviledges, so weston must be setuid root or laucnhed as root for this
to work.
Pekka Paalanen [Thu, 12 Jan 2012 12:52:09 +0000 (14:52 +0200)]
window: remove duplicate widget_resize_handler_t
Fixes the following build failure:
In file included from window.c:58:0:
window.h:194:16: error: redefinition of typedef 'widget_resize_handler_t'
window.h:178:16: note: previous declaration of 'widget_resize_handler_t' was here
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
Kristian Høgsberg [Mon, 16 Jan 2012 16:53:54 +0000 (11:53 -0500)]
compositor: Install a SEGV handler to try and clean up the VT if we crash
Kristian Høgsberg [Mon, 16 Jan 2012 15:57:14 +0000 (10:57 -0500)]
tty: Fix order of VT ack/release ioctls and the vt handler
We can only set up once we've acquired the VT and we shouldn't release the
VT until we've cleaned up. Before we would release the VT first, and then
race to drop drm master as X tried to get drm master. Which would kill X.
Kristian Høgsberg [Mon, 16 Jan 2012 15:54:07 +0000 (10:54 -0500)]
evdev: Drop noisy debug messages on vt swtich
Kristian Høgsberg [Mon, 16 Jan 2012 15:52:52 +0000 (10:52 -0500)]
compositor-drm: Exit if we failed to get drm master
We can do anything without drm master. Also log an error in case we
fail to drop it, which will be trouble for whoever we're switching to.
Kristian Høgsberg [Mon, 16 Jan 2012 03:16:11 +0000 (22:16 -0500)]
xserver: Create WM window, handle client messages
Olivier Le Thanh Duong [Sat, 14 Jan 2012 14:57:34 +0000 (15:57 +0100)]
evdev: Correct warning on missing input device
Kristian Høgsberg [Sun, 15 Jan 2012 21:05:28 +0000 (16:05 -0500)]
xserver: Just dup fd instead of two fcntls to get a non-O_CLOEXEC fd
Yeah, it's the same number of lines of code, but this actually checks
the error return.
Kristian Høgsberg [Sun, 15 Jan 2012 21:04:33 +0000 (16:04 -0500)]
xserver: Set DISPLAY for clients launched by the compositor
Kristian Høgsberg [Sun, 15 Jan 2012 20:51:12 +0000 (15:51 -0500)]
xserver: Don't set -logfile option, only available to root user
Kristian Høgsberg [Sun, 15 Jan 2012 20:17:58 +0000 (15:17 -0500)]
tty: Leave tty in KD_GRAPHICS mode during vt switches
Part of the point of KD_GRAPHICS mode is that the kernel doesn't try
to restore the VT contents when we switch bach, but leaves that
to the user mode process. This avoids ugly flicker of text mode contents
before the compositor takes over.
Kristian Høgsberg [Sun, 15 Jan 2012 19:29:09 +0000 (14:29 -0500)]
compositor-drm: Fail, and fail early if we can't set up the tty
Typically a permissions problem. Weston should be setuid root or
be launched by a setuid helper.
Kristian Høgsberg [Sun, 15 Jan 2012 20:20:53 +0000 (15:20 -0500)]
tty: Close tty fd on exit
Kristian Høgsberg [Sun, 15 Jan 2012 19:27:10 +0000 (14:27 -0500)]
tty: If no tty option is given, use stdin and make sure it's a vt
Richard Hughes [Fri, 13 Jan 2012 10:07:01 +0000 (10:07 +0000)]
Explicitly add GIO to the client libs
This prevents a build warning on Fedora 16 of:
undefined reference to symbol 'g_file_get_basename'
Kristian Høgsberg [Thu, 12 Jan 2012 15:48:51 +0000 (10:48 -0500)]
view: Make view compile again
Kristian Høgsberg [Wed, 11 Jan 2012 19:24:46 +0000 (14:24 -0500)]
Use new format codes
Kristian Høgsberg [Wed, 11 Jan 2012 16:18:14 +0000 (11:18 -0500)]
window: Don't deref focus widget if there isn't one
Kristian Høgsberg [Wed, 11 Jan 2012 05:09:42 +0000 (00:09 -0500)]
window: Remove a few unused struct fields
Kristian Høgsberg [Wed, 11 Jan 2012 05:04:42 +0000 (00:04 -0500)]
window: Move focus widget to struct input
Kristian Høgsberg [Wed, 11 Jan 2012 04:46:33 +0000 (23:46 -0500)]
window: Implement input device grabbing
With all input events going to widgets now, we can grab an input device
to a widget, so that all events are delivered to that widgets handlers.
This lets us implement the last bit of the menu behaviour, that is
the client side grabbing of events. The result is that we can now pop down
the menu when we receive clicks in the clients own windows and we
don't send motion and button events to other widgets.
Kristian Høgsberg [Wed, 11 Jan 2012 03:41:05 +0000 (22:41 -0500)]
window: Make decorations just a widget
Woohoo, only took 25 commits of refactoring to get to this point.
Kristian Høgsberg [Wed, 11 Jan 2012 00:11:42 +0000 (19:11 -0500)]
window: Get rid of the window child allocation concept
Kristian Høgsberg [Tue, 10 Jan 2012 19:28:58 +0000 (14:28 -0500)]
window: Break widget grab before shell surface move or grab
Kristian Høgsberg [Tue, 10 Jan 2012 18:59:23 +0000 (13:59 -0500)]
wscreensaver: Use a widget and a redraw handler
Kristian Høgsberg [Tue, 10 Jan 2012 18:52:34 +0000 (13:52 -0500)]
window: Keep widgets in a tree instead of a list
Kristian Høgsberg [Tue, 10 Jan 2012 17:25:04 +0000 (12:25 -0500)]
window: Use surface coordinates for looking up widgets
Kristian Høgsberg [Tue, 10 Jan 2012 17:23:19 +0000 (12:23 -0500)]
window: Make resize and redraw handlers widget vfuncs
Kristian Høgsberg [Tue, 10 Jan 2012 15:49:41 +0000 (10:49 -0500)]
window: Allocate and flush the window surface in window.c
No need to push this to the toolkit users.
Kristian Høgsberg [Tue, 10 Jan 2012 14:43:58 +0000 (09:43 -0500)]
window: Drop the window widget
It was just a temporary convenience for moving things over.
Kristian Høgsberg [Mon, 9 Jan 2012 23:56:37 +0000 (18:56 -0500)]
clients/image: Delete old old key code
Kristian Høgsberg [Mon, 9 Jan 2012 23:48:14 +0000 (18:48 -0500)]
window: Run deferred tasks before blocking for initial iteration
The first iteration of the while loop wouldn't run the deferred tasks
before blocking in epoll_wait(). Move things around so we do.
Kristian Høgsberg [Mon, 9 Jan 2012 16:22:32 +0000 (11:22 -0500)]
window: Return pointer type from widget enter handler
Kristian Høgsberg [Mon, 9 Jan 2012 16:16:50 +0000 (11:16 -0500)]
desktop-shell: Rename panel_widget to panel_launcher
Kristian Høgsberg [Mon, 9 Jan 2012 16:12:05 +0000 (11:12 -0500)]
window: Move button handler to widget
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>