Commit Graph

358 Commits

Author SHA1 Message Date
Tiago Vignatti
ac9cfd3065 evdev: Simplify error path for device creation
Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
2011-10-28 13:15:25 -04:00
Tiago Vignatti
d9f7d1f0c5 evdev: Delete unused fields from evdev_input_device
Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
2011-10-28 13:09:42 -04:00
Tiago Vignatti
ac2dc6aafe evdev: Add hotplug support
Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
2011-10-28 13:05:06 -04:00
Ander Conselvan de Oliveira
9a38a0a191 compositor: page flip away from a client buffer if it's destroyed
If the current or pending scanout buffer is destroyed, the client frame
will remain being displayed until something else causes a repaint to be
scheduled.

Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
2011-10-28 12:43:47 -04:00
Kristian Høgsberg
ac5098f11a Merge remote-tracking branch 'robster/rob/pointer-fixes' 2011-10-25 09:07:12 -04:00
Rob Bradford
1d72447d9b compositor: Report an error if we cannot the load the pointer image files 2011-10-25 13:43:44 +01:00
Rob Bradford
d354711fc7 compositor: Don't try and use a NULL sprite for the device pointer
If loading the pointer images to the sprites fails then do not try and use
those NULL sprites for the pointer.
2011-10-25 13:38:31 +01:00
Kristian Høgsberg
2459694ab2 compositor: Clean up resource destroy callback handling 2011-10-24 17:51:02 -04:00
Pekka Paalanen
02ebfb1276 compositor: fix drag segfault
Without this fix, the dnd demo would make the demo compositor crash in
shell.c:drag_offer() because resource->data is NULL.

Initialise resource->data in shell_create_drag().

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2011-10-24 15:35:09 -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
a4b7e20392 drm: Only add an output once we've successfully initialized it 2011-10-24 15:32:13 -04:00
Kristian Høgsberg
53e79898a4 drm: Remove unneccesary drm_output_prepare_render() call 2011-10-24 13:25:24 -04:00
Kristian Høgsberg
9c46ff1a1e drm: Specify depth as 24 when creating the KMS FB
At least intel kms rejects depth 32 now, and 24 is want we want.
2011-10-24 13:25:24 -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
dcef9ca23c x11: Fix last-minute edit bug 2011-10-12 00:01:18 -04:00
Kristian Høgsberg
d6e5525a20 x11: Manage xserver focus better 2011-10-11 23:41:17 -04:00
Kristian Høgsberg
707e10fa75 x11: Handle a few more window property atoms 2011-10-11 23:13:30 -04:00
Kristian Høgsberg
a6ef0993e8 x11: Truncate property string to property length 2011-10-11 22:46:01 -04:00
Kristian Høgsberg
f0d9116fc8 x11: Add a destroy listener for X11 surfaces 2011-10-11 22:44:23 -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
293af264af x11: Use compositor time, not X event time
X event time is not compatible with wlsc_compositor_get_time().
2011-10-11 17:23:02 -04:00
Benjamin Franzke
02dee2caad compositor-drm: Fix invalid usage of udev ressources
The reference returned by udev_list_entry_get_name is
only valid until udev_enumerate_unref is called.
Call unref after the last usage of such.
2011-10-07 10:00:11 +02:00
Benjamin Franzke
a764ee5158 compositor-drm: Enumerate only cards with name card*
To exclude /dev/dri/controlD* from the enumeration.
2011-10-07 09:57:50 +02:00
Benjamin Franzke
439d98697a compositor-drm: Be patient when output creation fails
Do not fail if e.g. only one of 3 connectors cant be enabled.
Could be that we just have not enough crtcs available.
2011-10-07 09:56:54 +02:00
Benjamin Franzke
c18366d1e9 compositor-openwfd: Fix tty assignment in backend_init 2011-10-07 08:33:08 +02: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
Tiago Vignatti
37f27d59cd xserver: check whether pointer exists when exiting
At initialization, if it fails in binding the socket or creating the
lock file then the pointer will be already freed and will result a
segfault when quiting the compositor.

Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
2011-09-08 18:27:31 -04:00
Kristian Høgsberg
a4a42f0ab5 shell: Reject moving or resizing toplevel windows 2011-09-08 16:56:57 -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
e7b5b41e93 evdev: Associate touchscreen devices with output up front
This isn't going to change over time, so just tracking it in the
evdev device is a little easier.  Also, we need to adjust for the
output position when transforming the device events to screen space.
2011-09-01 17:18:48 -04:00
Tiago Vignatti
d904359949 evdev: treat BTN_TOUCH as BTN_LEFT
idea stolen from xorg evdev.

Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
2011-09-01 17:18:07 -04:00
Tiago Vignatti
faee80196f compositor: choose tty from command line
This is a backend option, so you should use something like '-otty='.

Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
2011-09-01 16:07:07 -04:00
Tiago Vignatti
bbc2e03b2a evdev: use last output from compositor to get the screen geometries
Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
2011-09-01 12:32:29 -04:00
Tiago Vignatti
8be003baba evdev: organize the code for processing events
Nothing was touched, just code moved around.

Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
2011-09-01 12:30:48 -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
e8e0e6e2db Update gitignore 2011-08-31 16:25:32 -04:00
Benjamin Franzke
91eacca38b Remove egl display type setenv hack
No longer needed with mesa 7.12-devel egl display autodetection.
2011-08-31 16:25:18 -04:00
Benjamin Franzke
48c4ea2dbd compositor-drm: Merge drm_output_destroy and destroy_output 2011-08-31 16:24:27 -04:00
Benjamin Franzke
117483daaa compositor-drm: Coding style fixes
- Reformat indentation and 80-column wrap
 - Use output->base rather than output_base
 - Remove traling space
2011-08-31 16:24:25 -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