Commit Graph

1647 Commits

Author SHA1 Message Date
Martin Minarik
1998b154a7 window.c: frame_button: Maximize, minimize, close, icon buttons in window frame 2012-05-10 16:19:33 -04:00
Kristian Høgsberg
80680c7b75 window.c: Just use float instead of GLfloat, remove GLES2.h include 2012-05-10 14:11:44 -04:00
Kristian Høgsberg
b71302e1db Fix a few -pedantic warnings
We're not enabling -pedantic by default, but a quick test brought up a few
issues that we should fix.
2012-05-10 14:11:44 -04:00
Kristian Høgsberg
c4621b07f6 compositor: Report refresh rates in mHz
We compute the higher resolution from the mode timing parameters.
2012-05-10 14:09:48 -04:00
Kristian Høgsberg
34829dec71 compositor: Simplify clip_pointer_motion() and make it handle dead areas
We were testing if the pointer were outside any output and doing a lot of
work to compute the bounding box of all output and then clip against that.
Just clip against previous (valid) output and don't bother with the
bounding box.
2012-05-09 22:21:27 -04:00
Jonas Ådahl
f647c5a5d5 compositor: When clipping pointer motions, don't loose precision
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
2012-05-09 22:21:27 -04:00
Kristian Høgsberg
e11bbe4cc8 compositor: Use wl_fixed_t for incoming input events
This changes notify_motion, notify_pointer_focus and notify_touch to take
wl_fixed_t types for input coordinates.
2012-05-09 12:19:04 -04:00
Kristian Høgsberg
1f37601850 compositor: Move pointer motion clipping to its own function 2012-05-09 11:43:11 -04:00
Jonas Ådahl
c39aa5afca evdev: Convert wl_fixed_t to int before using internally
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
2012-05-09 11:30:49 -04:00
Dima Ryazanov
ff1c2d7914 window: Don't crash if a cursor image failed to load.
Signed-off-by: Dima Ryazanov <dima@gmail.com>
2012-05-09 11:25:11 -04:00
Rafal Mielniczuk
87e4c9354e window: fix check of cursor image load result 2012-05-08 16:22:31 -04:00
Daniel Stone
d42f457b66 Load an XKB keymap and state in the compositor
Not used yet, but will be in future commits.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-05-08 16:04:24 -04:00
Daniel Stone
db095ff3c3 Link compositors to xkbcommon as well
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-05-08 16:04:21 -04:00
Daniel Stone
855028fec9 Add xkb_names member plus config + X11 support
Add an xkb_names member to the base compositor info which contains the
RMLVO to use when building an XKB keymap.  Add support for filling this
from the config file or from the underlying X11 server, with the usual
defaults.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-05-08 16:02:48 -04:00
Kristian Høgsberg
7016313778 Port Wayland clients to new xkbcommon API
A little different from Daniels initial patch.  We look up the common
modifiers at xkb init time and convert the xkb serialized modifier mask
to our own modifier bitmask.
2012-05-08 15:55:39 -04:00
Daniel Stone
103db7fb56 Convert wire input co-ordinates to fixed-point
To add greater precision when working with transformed surfaces and/or
high-resolution input devices.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-05-08 14:41:01 -04:00
Daniel Stone
b230a7ee58 Convert internal input co-ordinates to GLfloat
Change all client motion handlers to take GLfloat for co-ordinates,
rather than int32_t.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-05-08 14:40:57 -04:00
Daniel Stone
bd3489b6e1 Add fixed-point versions of weston_surface_{to, from}_global
To be used by input code, paralleling the existing integer versions.

Enlarge the surface_{to,from}_global_float input types to GLfloat to
avoid losing precision.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-05-08 14:40:51 -04:00
Rob Bradford
eb95d0de7e build: Tighten mtdev dependency to reflect requirement
The mtdev_new_open symbol was added in 1.1.0.
2012-05-08 10:02:32 -04:00
Tiago Vignatti
52e598cf51 shell: use own struct for transient surfaces
No functional changes; it's only opening space for modifications coming along
on the next commits.

Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
2012-05-07 16:54:53 -04:00
Tiago Vignatti
70e5c9cc42 shell: fix uninitialized variable warning
and shut-up valgrind:
 Conditional jump or move depends on uninitialised value(s)
    at 0xB5AFB05: shell_surface_configure (shell.c:2162)
    by 0x407B0C: surface_attach (compositor.c:1225)
    by 0x621FA13: ffi_call_unix64
    by 0x621F434: ffi_call
    by 0x4E3D3F5: wl_closure_invoke (connection.c:758)
    by 0x4E3786C: wl_client_connection_data (wayland-server.c:255)
    by 0x4E3AA19: wl_event_source_fd_dispatch (event-loop.c:78)
    by 0x4E3B533: wl_event_loop_dispatch (event-loop.c:460)
    by 0x4E38D2C: wl_display_run (wayland-server.c:907)
    by 0x40B5DD: main (compositor.c:2748)

Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
2012-05-07 16:54:32 -04:00
Ander Conselvan de Oliveira
001de54ea1 window: use only one shm pool for all the cursor images
Cursor images are fairly small and having one pool for each image adds
a lot of unnecessary overhead. Instead, create one large pool and
allocated all cursor images from that.

In order to do that, however, the code that creates shm surface needed
some refactoring. This patch adds a new struct shm_pool that is used
by the cursor and also changes struct window to use it.
2012-05-07 14:44:02 -04:00
Daniel Stone
e5a0120757 Rename 'state' in axis (or ambiguous) bindings to 'value'
Since it's usually an axis value rather than a boolean, be slightly more
explicit about it.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-05-07 13:03:48 -04:00
Daniel Stone
5d66371743 Change button from int to uint32_t
Since you can't really have a negative button number.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-05-07 12:57:11 -04:00
Daniel Stone
da5b93c8d7 Change key/button grab bindings to take unsigned state
'state' here meaning 'is it up or down?', obviously.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-05-07 12:54:14 -04:00
Daniel Stone
7ceeb7dd43 test-client: Include poll.h to silence warning
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-05-07 10:59:08 -04:00
Kristian Høgsberg
8e1f77fee3 drm: Make KMS hw cursors work again 2012-05-03 11:39:35 -04:00
Ander Conselvan de Oliveira
1493d2ae1c window: use libXcursor for loading pointer images 2012-05-03 10:14:04 -04:00
Ander Conselvan de Oliveira
d51624f915 simple-egl: add option for running fullscreen 2012-05-02 10:04:31 -04:00
Ander Conselvan de Oliveira
a64b15d160 compositor-drm: alow scanning out of buffers with XRGB8888 format 2012-05-02 10:04:28 -04:00
Ander Conselvan de Oliveira
555c17ddd8 compositor-drm: refactor to avoid unnecessary allocation of KMS FBs
Currently, the drm backend will create and destroy a KMS FB for each
frame. However, the bos for a gbm surface are reused (at least with
mesa) so we can store the fb_id on it and destroy it only on the bo's
destroy callback.

To use the same path for scanning out client buffers, some refactor
was needed. Previously, the bo for the client buffer was destroyed
early so that gbm_surface_release_buffer() would not be called with
it, since at the page flip handler output->scanout_buffer can be
NULL even if the current frame is a client buffer.

This was solved by adding a drm_fb structure that holds a gbm_bo,
an fb_id, and information about the fb coming from a client buffer
or not. A drm_fb is created in such a way that it is destroyed
whenever the bo it references is destroyed. The fields current_*
and next_* in drm_output are changed into only two pointers to
drm_fb's.
2012-05-02 10:04:26 -04:00
Kristian Høgsberg
3e0fe5c0df window: Set window title and class 2012-05-02 09:47:55 -04:00
Kristian Høgsberg
e7afd919c9 shell: Handle set_title and set_class 2012-05-02 09:47:44 -04:00
Cooper Yuan
4577adce8c Use the dummy pbuffer we create to make current 2012-04-30 14:16:46 -04:00
Ander Conselvan de Oliveira
5f5f31939d compositor-drm: call EGL cleanup functions on exit 2012-04-30 10:44:18 -04:00
Kristian Høgsberg
f7e23d5c88 shell: Always configure when surface type changes
We can drop the force_configure hack.
2012-04-27 17:51:59 -04:00
Kristian Høgsberg
7f366e7053 shell: Don't move or reconfigure surfaces until we get the new buffer
Going from fullscreen to toplevel will restore the surface position
immediately.  This will move the fullscreen surface to where the toplevel
surface was before, which will flicker for a frame of two before the
resized, non-fullscreen buffer is attached.

Instead, only change the surface geometry when we get the new buffer.
2012-04-27 17:49:40 -04:00
Kristian Høgsberg
407ef64e17 window: Only set toplevel window type if nothing else is set 2012-04-27 17:17:12 -04:00
Alex Wu
7bcb8bd30e shell: Fix not remove rotation for fullscreen surf
Remove rotation when entering fullscreen and restore rotation when exiting.

https://bugs.freedesktop.org/show_bug.cgi?id=48906
2012-04-27 15:10:37 -04:00
Ander Conselvan de Oliveira
fb9808993b shell: allocate enough memory for shsurf->ping_timer 2012-04-27 15:06:18 -04:00
Kristian Høgsberg
a8479f1e3a Merge remote-tracking branch 'pq/simple-fixes' 2012-04-27 15:05:45 -04:00
Kristian Høgsberg
3018b4431b tests: Add event-test, which tests for a few incoming events
We check that we get surface.enter_output and move the pointer into
the window and make sure we get input_device.pointer_enter with
the right coordinates.

There's a lot of code for a very simple test here, so we need to
figure out how to reuse most of the event handling and such.  It's also
not clear that a custom, text based protocol is practical here, we might
just use a wayland extension after all.
2012-04-27 15:03:06 -04:00
Kristian Høgsberg
dd90921d87 tests: Generalize test client and add helpers for launching it 2012-04-27 11:15:58 -04:00
Kristian Høgsberg
915b7f8945 tests: Add test case for basic client lifecycle 2012-04-26 10:18:24 -04:00
Kristian Høgsberg
306e36185c tests: Add an initial weston integration test
The idea here is to make weston load test cases as a module and then
run test cases from within weston.
2012-04-26 09:07:13 -04:00
Scott Moreau
e17f61008c compositor: Initialize xserver variable
This variable is used unitialized if --xserver is not passed to weston.

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2012-04-26 15:56:06 +03:00
Pekka Paalanen
ec2507695f fix build for --disable-clients --enable-simple-clients
Simple clients were relying on AM_CFLAGS and AM_CPPFLAGS set for
toytoolkit clients. With toytoolkit clients disabled, the build fails
with missing wayland-client.h.

Move AM_CFLAGS and AM_CPPFLAGS outside of conditional sections, since
they are meant to be global settings.

Let simple clients override AM_CPPFLAGS with their own
SIMPLE_CLIENT_CFLAGS, which the configure script already sets up for us,
but was unused until now.

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2012-04-26 15:50:12 +03:00
Pekka Paalanen
c3710f2379 simple-shm: no need for wayland-egl.h
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2012-04-26 15:45:13 +03:00
Pekka Paalanen
3baf946b9a simple-shm: handle shm buffer failure
Do not segfault, if creating the shm buffer fails.

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2012-04-26 15:44:45 +03:00
Pekka Paalanen
f31ad10b77 compositor: report .so path when load_module() fails
I want to know which module is failing to load with unresolved symbols.

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2012-04-26 15:44:13 +03:00