Commit Graph

191 Commits

Author SHA1 Message Date
Kristian Høgsberg
2459694ab2 compositor: Clean up resource destroy callback handling 2011-10-24 17:51:02 -04:00
Ander Conselvan de Oliveira
02924bc0b6 compositor: fix whitespace error in wlsc_output_set_cursor
Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
2011-10-24 15:32:16 -04:00
Ander Conselvan de Oliveira
22e22a55be compositor: don't schedule idle_repaint from calls to repaint
wlsc_output_repaint may call wlsc_surface_damage indirectly through
wlsc_output_set_cursor. If this happens in the call made from repaint,
one ends up with repaint being called from both idle_repaint and
wlsc_output_finish_frame.

Fix this by setting output->repaint_scheduled to 1 before calling
wlsc_output_repaint in the function repaint.

[krh] Edited to just only clear repaint_scheduled, when we no longer have
a repaint scheduled.

Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
2011-10-24 15:32:16 -04:00
Kristian Høgsberg
191454e6c2 compositor: Rename scanout surfaces
Let's call the surface that's about to be pageflipped 'pending' and the
one we're currently showing 'scanout'.
2011-10-24 13:25:17 -04:00
Ander Conselvan de Oliveira
f1621d2945 compositor: don't release the front buffer after page flip
On repaint, wlsc_output_repaint will replace output->scanout_buffer with
the new front buffer and then output->present() will cause this buffer
to be displayed. When wlsc_output_finish_frame is called, the
compositor will send a release buffer event for output->scanout_buffer
which is actually the front buffer now.

This patch changes this code to release the previous scanout_buffer
instead of the front buffer on wlsc_output_finish_frame.

Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
2011-10-24 11:59:11 -04:00
Ander Conselvan de Oliveira
3b19966f19 compositor: move setup of scanout surface out of wlsc_output_repaint
Move this to a separate function to better accommodate changes in the
following commit.

Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
2011-10-24 11:59:11 -04:00
Kristian Høgsberg
cbd06f94d1 compositor: Silence a couple of valgrind warnings 2011-10-12 16:29:31 -04:00
Kristian Høgsberg
32ff1f5012 compositor: Dont repick for grabbed surfaces 2011-10-12 00:36:54 -04:00
Kristian Høgsberg
d2baf1fe5f compositor: Repick focus surface as surfaces come and go 2011-10-11 22:22:27 -04:00
Kristian Høgsberg
96aa7da24a Change remaining GPLv2 headers to MIT
The files in question are copyright Benjamin Franzke (who agrees),
Intel Corporation, Red Hat and myself.  On behalf of Red Hat,
Richard Fontana says:

   "Therefore, to the extent that Red Hat, Inc. has any copyright
    interest in the files you cited as of this date (compositor-drm.c,
    compositor.c, compositor.h, screenshooter.c in
    http://cgit.freedesktop.org/wayland/wayland-demos/tree/compositor),
    Red Hat hereby elects to apply the CC0 1.0 Universal Public Domain
    Dedication to such copyrighted material.  See:
    http://creativecommons.org/publicdomain/zero/1.0/legalcode .

    Thanks,
    Richard E. Fontana
    Open Source Licensing and Patent Counsel
    Red Hat, Inc."
2011-09-19 17:29:24 -04:00
Kristian Høgsberg
9c4eecb5c0 Rename motion_grab to implicit_grab
Let's just use the same terms as X.
2011-09-06 18:13:14 -04:00
Kristian Høgsberg
7584062153 Add a desktop_shell interface
Mostly a toy-thing for now, to allow prototyping a desktop-shell client.
2011-09-06 13:48:16 -04:00
Kristian Høgsberg
f59da399d8 compositor: Don't crash when receiving kb focus with no surface 2011-09-06 13:44:56 -04:00
Kristian Høgsberg
109a00700e compositor: Drop built-in background support
There should always be a background client (file manager, home screen,
animated wallpaper or just a plain static image).
2011-09-06 13:43:50 -04:00
Kristian Høgsberg
4eaa830381 compositor: Repick surface when grab ends
We were doing it manually in a few places and forgetting it in the
implicit grab case.
2011-09-06 13:41:47 -04:00
Kristian Høgsberg
9ebcf94b83 Use wl_resource_* error functions 2011-09-01 09:54:57 -04:00
Matt Roper
11568a73ba Turn off hardware cursor when screen fade begins.
The compositor was never actually calling the output backend to turn off
the hardware cursor when the screen begins fading.  This would result in
a stuck hardware cursor and movable software cursor for the duration of
the fade/unfade.

Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
2011-08-31 16:27:35 -04:00
Benjamin Franzke
b826302efb Remove return type from wlsc_compositor_shutdown
Fixes "control reaches end of non-void function" warning
and is not needed (yet).
2011-08-31 16:24:23 -04:00
Kristian Høgsberg
f389cacc20 Move away from visuals and just use EGLConfigs or shm format tokens 2011-08-31 16:21:38 -04:00
Kristian Høgsberg
4ebf3a0c2e Fix cursor visibility bug 2011-08-29 17:12:37 -04:00
Kristian Høgsberg
6f7179c652 compositor: Discard surface.frame if the surface isn't visible 2011-08-29 17:12:37 -04:00
Kristian Høgsberg
8e6d71247e compositor: Track bound resources for input device 2011-08-29 17:12:37 -04:00
Kristian Høgsberg
57295ebf20 compositor: Handle NULL buffer in input_device.attach correctly 2011-08-29 17:12:37 -04:00
Kristian Høgsberg
fd07fb76bc Create resource for wl_output 2011-08-29 17:12:37 -04:00
Kristian Høgsberg
97d44aa58b Pass resources to functions that take object references 2011-08-29 17:12:37 -04:00
Kristian Høgsberg
f790c79ec7 Use wl_display_bind() for binding to globals 2011-08-29 17:12:36 -04:00
Kristian Høgsberg
d9551a3377 compositor: drop wl_display_add_object() 2011-08-29 17:12:36 -04:00
Kristian Høgsberg
904055a652 compositor: Make all exported objects wl_resources 2011-08-29 17:12:36 -04:00
Kristian Høgsberg
334182062f Use the new wl_callback interface 2011-08-29 17:12:36 -04:00
Matt Roper
361d2ade02 Update compositor shutdown code
Adds a general wlsc_compositor_shutdown() function that all output
backends call when shutting down.  wlsc_compositor_shutdown() will call
a new 'destroy' method of each output to perform backend-specific
cleanup (e.g., turning off the hardware cursor in the DRM compositor).

Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
2011-08-29 17:12:27 -04:00
Tiago Vignatti
2cc8b87310 compositor: fix pitch initialization
texture_region was getting a trash value for computing.  I don't
understand how we couldn't see any artifact on surface output in such
case.

Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
2011-08-19 10:55:33 -04:00
Kristian Høgsberg
6bded3fd95 Don't pass NULL pointer as user data to signal handler 2011-08-12 14:55:07 -04:00
Tiago Vignatti
2116b89156 compositor: Move signal handler initialization before module loading
Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
2011-08-11 15:15:30 -04:00
Kristian Høgsberg
9ffb6b9866 compositor: Only configure surface when it changes geometry 2011-07-21 20:14:57 -07:00
Kristian Høgsberg
4f0df049bb compositor: Pick output for surface based on amount of overlap 2011-07-21 20:14:52 -07:00
Kristian Høgsberg
3cad436a91 xserver: Clean up X server socket on exit 2011-07-15 21:09:24 -04:00
Kristian Høgsberg
7341e9b6d9 compositor: Fix damage tracking for multi-head compositors 2011-07-01 22:12:11 -04:00
Benjamin Franzke
a8bdeae1b6 compositor: Fix cursor damaging on multi head
Removing cursors from the surface list,
for usage as hardware cursor needs lower damaging.

Also damge when re-adding to the surface list.
2011-07-01 15:51:41 -04:00
Kristian Høgsberg
5ec0a93a98 compositor: Add a simple WM to the xserver launcher 2011-07-01 10:46:40 -04:00
Kristian Høgsberg
cd0d10b752 compositor: Damage surface when raising 2011-06-24 08:37:06 -04:00
Kristian Høgsberg
a691aeefd7 compositor: Track opaque region of a surface 2011-06-23 22:48:37 -04:00
Kristian Høgsberg
aee7f84347 compositor: Stop repainting below opaque surfaces 2011-06-23 21:25:20 -04:00
Kristian Høgsberg
53df1d8a6b compositor: Fix a couple of region leaks 2011-06-23 21:11:19 -04:00
Kristian Høgsberg
b8a983395d compositor: Add helper to damage surface below 2011-06-23 21:00:04 -04:00
Kristian Høgsberg
8b72f60478 compositor: Clip away obscured damage 2011-06-23 20:46:34 -04:00
Kristian Høgsberg
20300ba112 compositor: Accumulate damage in per-surface regions 2011-06-23 20:29:12 -04:00
Benjamin Franzke
b7c00a4376 Send keyboard_focus only to client surfaces 2011-06-23 23:30:30 +02:00
Kristian Høgsberg
758dd3ea55 compsitor: Put background surface in the big surface list 2011-06-23 15:52:11 -04:00
Kristian Høgsberg
8244b44524 compositor: Put cursor surfaces into the big surface list 2011-06-23 15:52:11 -04:00
Kristian Høgsberg
751b5bcdd2 compositor: Change default background to be a png 2011-06-23 15:52:10 -04:00