Commit Graph

968 Commits

Author SHA1 Message Date
Kristian Høgsberg 64f1c3fd52 De-brand the tablet shell
Drop the MeeGo part of the name.
2011-11-14 15:57:59 -05:00
Kristian Høgsberg c4693c4ab4 Install desktop-shell in $prefix/libexec 2011-11-14 14:57:17 -05:00
Kristian Høgsberg d826404472 compositor: Drop redundant compositor->damage
This is the same as the damage of the top-level surface so just use that.
There's a problem that if we change the stacking, the damage layering breaks,
but that's a problem we already have.
2011-11-11 11:48:15 -05:00
Kristian Høgsberg 46770139bc shell: Set initial toplevel position in map callback 2011-11-09 12:40:08 -05:00
Kristian Høgsberg 32e24cc628 compositor: Split shell->attach into map and configure
The shell module only needs to deal with attach when it's either the initial
attach or when the attach changes the size of the surface.  In case of
initial attach, the shell needs to pick a position for the surface and a
place in the surface stack.  We split this case out as a new shell->map
callback.  The other case is split into the shell->configure callback,
where the shell may adjust the surface position or reject the new size.
2011-11-09 12:07:35 -05:00
David Herrmann 63ff706c0e compositor-drm: Fix setting O_CLOEXEC
The third parameter of open() is for file-creation modes. File flags are passed
in the second paramater.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2011-11-05 22:04:03 -04:00
Pekka Paalanen bbe605241d compositor: only authorized client can bind desktop_shell
Check, that only the desktop-shell client spawned by the compositor
(desktop-shell plugin) is allowed to bind to desktop_shell interface.
Other clients will receive an error like:

  wl_display@1.error(desktop_shell@20, 0,
  "permission to bind desktop_shell denied")

The error has the proper object id and interface type.

Note: desktop-shell cannot be started manually anymore, it has to be
started by the compositor automatically.

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2011-11-03 15:16:39 -04:00
Pekka Paalanen 6cd281a023 desktop-shell: launch from the compositor
Fork and exec desktop-shell in the compositor. This is a way to create
an authenticated client. Later, the desktop-shell interface will be
reserved for this client only.

For exec to work, the compositor should be started from the
wayland-demos' root directory.

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2011-11-03 15:16:19 -04:00
Ander Conselvan de Oliveira ef7c8d9ddf compositor-*: check for surfaceless_gles2 instead of surfaceless_opengl
All the compositors are using GLES2 so check for the appropriate
surfaceless extension.

Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
2011-11-01 11:18:39 -04:00
Kristian Høgsberg d3ef7be781 compositor: Tweak fade spring to not overshoot 2011-10-29 15:04:42 -04:00
Kristian Høgsberg 06a670f2e7 compositor-x11: Call finish_frame from a timer callback
The repaint logic breaks when finish_frame is called from the present
callback.  Ideally we should throttle to vsync (or even better, the
compositor repaint cycle, but hey, X is X), but this goes a long way.
2011-10-29 14:39:13 -04:00
Kristian Høgsberg 3ff589df78 compositor: Make spring model always use the same time step 2011-10-29 13:41:18 -04:00
Kristian Høgsberg ff298d9834 compositor: Clear cursor buffer in create_sprite_from_png() 2011-10-28 20:41:28 -04:00
Ander Conselvan de Oliveira 0de0aafa7f composior: fix tiny cursor bug with drm compositor
The drm compositor always creates a 64x64 bo for the cursor image
regardless of the size of the actual cursor. When the fade animation
kicks in it disables the hardware cursor so that it is rendered as a
regular surface. This surface is rendered to a 32x32 region but using
a 64x64 texture so the cursor gets scaled down.

Fix this by making create_cursor_image return the actual size of the
image created to the compositor.

Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
2011-10-28 14:36:28 -04:00
Casey Dahlin fb39963cc9 Update .gitignores 2011-10-28 13:32:17 -04:00
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
Rob Bradford 8bd35c7770 window: Avoid setting an invalid surface for the pointer
If we failed to load the pointer image to the surface then do not create a
buffer from a NULL surface and do not attach that to the device.
2011-10-25 12:20:51 +01:00
Rob Bradford 21223bf6d1 window: Report an error if we cannot load the pointer files 2011-10-25 12:19:36 +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
Eugeni Dodonov 397b908d7b Add missing include for gio.h.
This is needed by GFile, used by view.c.

Signed-off-by: Eugeni Dodonov <eugeni.dodonov@intel.com>
2011-10-24 11:58:24 -04:00
Kristian Høgsberg bf8bd5aa3a cairo-util: Fix another last-minute typo 2011-10-20 14:44:48 -04:00
Kristian Høgsberg 27d3866045 cairo-util: Add helper to load jpeg files 2011-10-20 13:11:12 -04:00
Kristian Høgsberg 9ef9e0ecf9 simple-egl: Remove leftover wl_visual variable 2011-10-19 21:16:58 -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 bcee9a4b25 desktop-shell: Add beginning of pop-up menu to panel 2011-10-12 00:36:16 -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 1a89f28c7d gears: Fail if compiled without cairo-egl 2011-10-07 10:06:01 +02:00
Benjamin Franzke 0c99163d9b window: Create a cairo device for each egl config 2011-10-07 10:06:01 +02:00