Pekka Paalanen
79b5652de6
window: fix missed xkb API adaptation
...
Oddly enough, this failed to build on Android, but not otherwise.
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
13 years ago
Kristian Høgsberg
4c3dac9c66
clients: Remove superfluous #includes
...
In particular window.c and many clients were including glib.h without
using it and without the right cflags.
13 years ago
Kristian Høgsberg
bef52d1423
Update to new libxkbcommon API
...
We no longer depend on xproto, we use xkbcommon keycodes now. Yay!
13 years ago
Martin Minarik
1998b154a7
window.c: frame_button: Maximize, minimize, close, icon buttons in window frame
13 years ago
Kristian Høgsberg
80680c7b75
window.c: Just use float instead of GLfloat, remove GLES2.h include
13 years ago
Dima Ryazanov
ff1c2d7914
window: Don't crash if a cursor image failed to load.
...
Signed-off-by: Dima Ryazanov <dima@gmail.com>
13 years ago
Rafal Mielniczuk
87e4c9354e
window: fix check of cursor image load result
13 years ago
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.
13 years ago
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>
13 years ago
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>
13 years ago
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.
13 years ago
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>
13 years ago
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>
13 years ago
Ander Conselvan de Oliveira
1493d2ae1c
window: use libXcursor for loading pointer images
13 years ago
Kristian Høgsberg
3e0fe5c0df
window: Set window title and class
13 years ago
Kristian Høgsberg
407ef64e17
window: Only set toplevel window type if nothing else is set
13 years ago
Casey Dahlin
9074db5d62
Send surface enter/leave events
...
These new protocol events allow us to tell which outputs a surface is on, and
potentially update where we allocate our buffers from.
Signed-off-by: Casey Dahlin <cdahlin@redhat.com>
13 years ago
Scott Moreau
ff1db4a4f3
Install structuring for ping-pong protocol
13 years ago
Kristian Høgsberg
a6c8b0084f
window.c: Drop the toolkit grab when we start a compositor grab
...
We do this right for move and resize, but dnd and popups need the same
treatment.
13 years ago
Kristian Høgsberg
f2eb68a921
window: Send serial number in set_popup request
13 years ago
Kristian Høgsberg
84b76c72c8
window: Initialize redraw_task.link so we can always remove it
13 years ago
Kristian Høgsberg
eae5de7609
Follow wayland change to serial numbers
13 years ago
Kristian Høgsberg
5990fbb6e2
window: Fix remaining references to the egl image surface type
...
Didn't catch these before, was compiling with sw cairo.
13 years ago
Kristian Høgsberg
bad4297380
window: Drop EGLImage surface type
13 years ago
Kristian Høgsberg
24b5e230fa
window: Only unmap shm surface backing memory if it belongs to surface
...
Memory allocated out of the resize shm pool will be unmapped when the pool
is destroyed.
13 years ago
Kristian Høgsberg
6e2a8d74b5
window: Simplify the shm surface management
...
We can destroy a shm wl_buffer immediately after sending it to the server.
13 years ago
Kristian Høgsberg
610a3f2922
window: Check load_image result for NULL
13 years ago
Jonas Ådahl
3685c3abf6
Fix `unused-result' warnings.
...
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
13 years ago
Kristian Høgsberg
1103a1a484
window: Use a persistent, big shm pool during resize
...
The biggest performance bottleneck while resizing is the continous
setting up and tearing down of mmaps and faulting in pages. This commit
introduces a per-window pool that we'll allocate buffers out of if it's
available. Then we set initialize it to a big shm pool when we start
resizing and free it when resizing is done.
13 years ago
Kristian Høgsberg
8f64ed0381
window: Only initialize egl if we have cairo egl
13 years ago
Kristian Høgsberg
16626282fd
clients: Use new shm interface
13 years ago
Kristian Høgsberg
875ab9e735
Add signedness warning flag and fix fallout
13 years ago
Kristian Høgsberg
9629fe3206
Simplify shm buffer handling
...
There was a lot of code here to do a lot of work we didn't need to do.
If we damage a surface with a shm buffer attached, all we need to do
is to re-upload the damaged region to the texture. As for drm buffers,
we don't assume anything changes on attach and only update the
regions the client tells us to update in the damage request.
13 years ago
Kristian Høgsberg
42b4f80116
window.c: Do resize work from the repaint idle callback
...
This way we always make sure we handle any resizing before we start drawing.
13 years ago
Kristian Høgsberg
6bd4d97271
window.c; Only redraw once per frame
...
Based on a patch from Martin Minarik <minarik11@student.fiit.stuba.sk> who
tracked down the excessive redraw problem.
13 years ago
Scott Moreau
210d079817
Hook up axis events.
13 years ago
Kristian Høgsberg
ec323d222c
window.c: Increase drop shadow fluffiness
13 years ago
Kristian Høgsberg
b8abe7e9ae
window.c: Tweak window decoration appearance
...
The old orange decorations were starting to look like clown shoes.
13 years ago
Kristian Høgsberg
f02a649a3c
Consolidate image loading code and move to shared/
13 years ago
Kristian Høgsberg
bcacef19b0
Add an option parser
...
On one hand, getopt (in particular the -o suboption syntax) sucks on the
server side, and on the client side we would like to avoid the glib
dependency. We can roll out own option parser and solve both problems
and save a few lines of code total.
13 years ago
Rob Clark
6396ed36f4
clients/window: fix build issues w/ gles
13 years ago
Kristian Høgsberg
b435e84d5a
window: Compute frame boundary for all windows except fullscreen
...
We were only computing it for toplevel type windows, which broke
the unlock dialog size allocation and repainting.
13 years ago
Kristian Høgsberg
63e5e06d82
window: Only set opaque and input regions if they change
...
Setting these regions damages the entire window or causes a repick, which
we don't want to trigger if we don't need to.
13 years ago
Kristian Høgsberg
067fd60534
window.c: Drop support for rgb contexts
13 years ago
Kristian Høgsberg
f10df85cd7
window: Set opaque region after child widget adjusts size
13 years ago
Kristian Høgsberg
fcfc83f6ae
clients: Use wl_display_disconnect()
13 years ago
Kristian Høgsberg
010f98b083
window: Track and report input and opaque regions
...
We just set the input region to the bounding box of the window frame
and set the opaque region to be the opaque rectangle inside the window
if the child widget is opaque.
13 years ago
Kristian Høgsberg
06d58b74af
Update to enter/leave events for pointer and keyboard
13 years ago
Kristian Høgsberg
2675dc1c8d
window: Don't draw decorations in fullscreen mode
13 years ago
Kristian Høgsberg
1517defe13
window: Set window type as it changes, not on every attach
...
It was always a bit sloppy, and the new fullscreen request doesn't work
that way.
13 years ago