summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2012-07-09protocol: Add missing allow-null to data_device.enter data_offer fieldAnder Conselvan de Oliveira1-1/+1
Fixes bug 51889.
2012-07-09shm: Plug leak in shm_create_pool()Martin Olsson1-6/+9
2012-07-09server: Don't crash for wl_seat_set_touch(seat, NULL)Martin Olsson1-1/+1
2012-07-09scanner: Plug memory leak in end_element()Martin Olsson1-1/+1
2012-07-09wayland-cursor: Add error handling for shm_pool_create()Martin Olsson1-9/+11
2012-07-02protocol: Add a couple of missing allow-null annotationsKristian Høgsberg1-2/+2
wl_data_device.set_selection() allows NULL to withdraw the previously set selection and wl_surface.attach() allows a NULL buffer to hide the surface.
2012-07-02protocol: Explicitly mark requests which allow null argumentsChristopher James Halse Rogers1-9/+9
Signed-off-by: Christopher James Halse Rogers <christopher.halse.rogers@canonical.com>
2012-07-02protocol: Add explicit nullable typesChristopher James Halse Rogers3-12/+188
Most of the time it does not make sense to pass a NULL object, string, or array to a protocol request. This commit adds an explicit “allow-null” attribute to mark the request arguments where NULL makes sense. Passing a NULL object, string, or array to a protocol request which is not marked as allow-null is now an error. An implementation will never receive a NULL value for these arguments from a client. Signed-off-by: Christopher James Halse Rogers <christopher.halse.rogers@canonical.com>
2012-06-30tests: test that path names longer than 108 bytes are rejectedDylan Noblesmith2-1/+86
These would either overflow the struct sockaddr_un, or be truncated and leave a non-null-terminated string.
2012-06-30tests: fix make check for out-of-tree buildsDylan Noblesmith11-12/+13
It was failing with missing include files. While here, destroy the ugly "../src/..." include paths used in the tests that was just hacking around this problem in the Makefile: sed -i s/..\\/src\\/// tests/*.c
2012-06-30tests: sort list of testsDylan Noblesmith1-9/+9
2012-06-30wayland-client: reject socket paths longer than 108 bytesDylan Noblesmith1-1/+13
Attempting to write anything longer into the embedded char array would create a non-null-terminated string, and all later reads would run off the end into invalid memory. This is a hard limitation of AF_LOCAL/AF_UNIX sockets.
2012-06-30wayland-server: reject socket paths longer than 108 bytesDylan Noblesmith1-1/+15
Attempting to write anything longer into the embedded char array would create a non-null-terminated string, and all later reads would run off the end into invalid memory. This is a hard limitation of AF_LOCAL/AF_UNIX sockets.
2012-06-30wayland-server: add more logging of errorsDylan Noblesmith1-0/+2
2012-06-30wayland-server: fix socket ownership race conditionDylan Noblesmith1-10/+10
Always unlink() the lock file before closing the file descriptor for it. Otherwise, there is a race like this: Process A closes fd, releasing the lock Process B opens the same file, taking the lock Process A unlinks the lock file Process C opens the same file, which now no longer exists, and takes the lock on the newly created lock file Process B and C both 'own' the same display socket. unlink()ing while holding the lock is effectively a better way to release the lock atomically.
2012-06-30wayland-server: fix fd leak on error pathDylan Noblesmith1-8/+16
And restructure get_socket_lock() so it's clearer that it's allocating a new file descriptor. Uncovered by an upcoming test.
2012-06-30drop use of strerror()Dylan Noblesmith2-2/+2
It isn't thread-safe. Use the %m conversion specifier instead, like the rest of the code already does.
2012-06-30wayland-server: reduce use of magic numbersDylan Noblesmith1-6/+15
Make it clear what the significance of '5' and '113' actually is. Also drop an unneeded function argument.
2012-06-28Allocate client proxy automatically for new objectsKristian Høgsberg4-4/+57
When the server send a new object ID, the client used to have to allocate the proxy manually and without type-safety. We now allocate the proxy in a client-side post-processing step on the incoming closure.
2012-06-28protocol: Change wording of pointer.set_cursor()Ander Conselvan de Oliveira1-2/+3
Change the description of pointer.set_cursor() so that a client without pointer focus but that currently owns the pointer surface can update the hotspot using it.
2012-06-27wl_shell: Don't require that parent surfaces are wl_shell_surfacesKristian Høgsberg1-2/+2
The set_transient and set_popup requests take a wl_shell_surface as the parent surface argument. We don't need the parent surface to be a shell surface and this restricts the types of surfaces we can use the transient and popup surface types on.
2012-06-25configure.ac: Bump version to 0.94.900.94.90Kristian Høgsberg1-2/+2
2012-06-22Send modifier event to pointer focus when it changes tooKristian Høgsberg1-17/+31
2012-06-22Send keyboard modifier event using the keyboard resourceKristian Høgsberg1-1/+1
2012-06-22Maintain keyboard modifier state in wayland-serverDaniel Stone2-1/+26
Provide a slot for keyboard modifier state inside wl_keyboard for implementations to update, and use this to send wl_keyboard:;modifier events whenever the keyboard or pointer focus changes. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-06-19wayland-cursor: Plug leak of filename on load_all_cursors_from_dir()Ander Conselvan de Oliveira1-1/+4
2012-06-18Xcursor: Don't ignore unknown file typesDaniel Stone1-1/+2
XFS doesn't return the file type with opendir(), and instead only returns it when you stat() the file itself. c66f2602 introduced a check to ensure that only files and symlinks were loaded, while not checking for DT_UNKNOWN. Properly handle DT_UNKNOWN by just proceeding anyway. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-06-18data-device: Fix list corruption when the source goes awayKristian Høgsberg1-1/+2
If the data source is destroyed, the corresponding offers may stay around for a little longer (until the owning client destroys it). When the offer is finally destroyed, we have to be careful to only remove the source destroy listener if the source hasn't yet been destroyed. Thanks to Martin Minarik for tracking down where the corruption happened.
2012-06-15tests: Update test cases to new closure allocate conventionKristian Høgsberg2-38/+36
2012-06-15TODO: Remove cursor-as-regular-surface itemKristian Høgsberg1-5/+0
2012-06-15cursor: Add function for calculating current frame in cursor animationAnder Conselvan de Oliveira2-7/+45
Given a pointer to struct wl_cursor and an elapsed time in ms., wl_cursor_frame() will return the index of the cursor image the should be displayed.
2012-06-15protocol: replace pointer.attach with pointer.set_cursorAnder Conselvan de Oliveira1-6/+21
2012-06-13TODO: Update to account for changes from DanielKristian Høgsberg1-14/+0
2012-06-13connection: Set closure->start in demarshal toomalloc-closureKristian Høgsberg1-0/+1
2012-06-13connection: Always malloc closureKristian Høgsberg4-65/+62
This lets us allocate the closure just big enough and is a first step towards a message queue.
2012-06-12wayland-server: Add destroy signal to wl_seatJonas Ådahl2-0/+5
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
2012-06-12wayland-util: wl_list_insert_list() should accept empty listsJonas Ådahl1-0/+3
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
2012-06-08wayland-cursor: add an option that changes the cursor theme directoryAnder Conselvan de Oliveira2-1/+10
Some distros (e.g. gentoo) install cursor themes in non-standard directories. Add option --with-icondir to configure.sh that sets the directory in which to look for cursors.
2012-06-06server: require XDG_RUNTIME_DIRPekka Paalanen1-7/+10
An arbitrary fallback to the current directory is only confusing. Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2012-06-06client: require XDG_RUNTIME_DIRPekka Paalanen1-8/+11
An arbitrary fallback to the current directory is only confusing. Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2012-06-05Add a focus change signal for wl_pointer and wl_keyboardKristian Høgsberg2-0/+6
2012-06-03TODO: Drop clipboard manager itemKristian Høgsberg1-12/+0
We have a reasonable prototype in weston now and we're going to conclude that the persistent selection functionality is either going to be part of the compositor (as for weston) or use a custom protocol.
2012-06-03data-device: Don't implement data source through data offer objectKristian Høgsberg2-22/+39
The wl_data_source object used to specify the implementation for data offers created for it. This means you need a data offer to retrieve the data from the source, which makes it awkward to use in-process in a compositor. Now we instead have three virtual functions that can be connected to a protocol object or in-process data-sources such as an X server proxy or clipboard.
2012-06-01Add wl_keyboard::keymap eventDaniel Stone1-0/+18
With this event, the compositor generates one canonical keymap for all clients, and then sends an mmap()able fd over the wire, rather than all the clients generating possibly disparate keymaps. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-05-31data-device: Handle setting a NULL selection sourceKristian Høgsberg1-5/+9
2012-05-31data-device: Emit selection_signal also when we lose the selectionKristian Høgsberg1-0/+2
2012-05-31data-device: Only send out NULL selection if we have a resourceKristian Høgsberg1-1/+2
If the current keyboard focus client doesn't have a resource for the data_device, don't send out the selection event.
2012-05-31Convert wl_pointer::axis to fixedDaniel Stone1-1/+1
Which allows for smooth scrolling, among other things. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-05-31Add key_state and button_state enumsDaniel Stone3-6/+30
Rather than hardcoding 0 and 1 everywhere. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-05-31wl_keyboard: Add modifier eventDaniel Stone3-1/+34
This event sends the current keyboard modifier/group state from the compositor to the client, allowing all clients to have a consistent view of the keyboard state (e.g. current layout, Caps Lock, et al). It should be sent after a keyboard enter event, and also immediately after any key event which changes the modifier state. Signed-off-by: Daniel Stone <daniel@fooishbar.org>