Commit Graph

2239 Commits

Author SHA1 Message Date
Philipp Brüschweiler
585acb0013 weston-info: client that print out information about the running compositor
This includes seat capabilities, shm formats and output information.
2012-08-15 11:40:42 -04:00
Rob Clark
48cd58b25c compositor: a couple debug logs
Well, they were useful to me in debugging, so probably sooner or later
useful to someone else.

Signed-off-by: Rob Clark <rob@ti.com>
2012-08-14 19:53:39 -04:00
Philipp Brüschweiler
7e0cc54fca toytoolkit: add axis handler 2012-08-14 15:51:13 -04:00
Philipp Brüschweiler
468262be3e event-test: fix compilation
Also fixes a compiler warning in test-client. The test is still failing,
but that's for another patch.

https://bugs.freedesktop.org/show_bug.cgi?id=53462
2012-08-14 10:17:07 -04:00
Philipp Brüschweiler
b8a8aff357 toytoolkit: remove unused actions from titlebar menu
They were introduced in b3cca0a411
but never actually implemented. Removing them should at least stop
users from wondering if weston is broken.

https://bugs.freedesktop.org/show_bug.cgi?id=52455
2012-08-14 10:17:07 -04:00
Philipp Brüschweiler
70cc73b8d8 eventdemo: add axis logging
https://bugs.freedesktop.org/show_bug.cgi?id=52453
2012-08-14 10:17:06 -04:00
Philipp Brüschweiler
a306a2691a eventdemo: fix --no-border
This was broken by commit 29af3ebce6
2012-08-14 10:17:06 -04:00
Philipp Brüschweiler
850f504aa2 eventdemo: fix incorrect comments 2012-08-14 10:17:06 -04:00
Kristian Høgsberg
90bc88c710 compositor-wayland: Set make and model 2012-08-14 10:17:06 -04:00
Kristian Høgsberg
539d85f69d compositor-wayland: Call notify_pointer_focus() for content area only
We don't want to send enter/leave events to the compositor when the pointer
enters the surface, only when the pointer enters the content area.  This
avoids hiding the cursor when entering the frame and sending out-of-bounds
coordinates to notify_pointer_focus().
2012-08-14 10:17:06 -04:00
Kristian Høgsberg
86adef9d54 window.c: Handle multiple keyboard foci
Keep a count of number of wl_keyboard focus we have instead of
tracking the more recent wl_keyboard.
2012-08-13 22:28:10 -04:00
Kristian Høgsberg
d3800e4788 compositor: Use pointer_cursor_surface_configure() in wl_pointer.set_cursor
This way we map the surface if it currently isn't mapped and avoid
duplicating some of the code already in pointer_cursor_surface_configure().
Without this, the cursor code relied on a wl_surface.attach() to show the
new pointer surface.  If we're not changing the cursor buffer, we don't
get that, but we still need to map the cursor.
2012-08-13 18:18:32 -04:00
Philipp Brüschweiler
6cef009272 shell: don't segfault when pressing super+k when no surface is focused 2012-08-13 16:30:55 -04:00
Philipp Brüschweiler
1f54f17ef8 image: handle multiple images correctly
Don't stop the application when only one window is closed. Don't stall
indefinitely if no valid image file is given as input.
2012-08-13 16:30:55 -04:00
Philipp Brüschweiler
f22d0ecd97 dnd: fix segfault on grabbing
Some cursor themes don't include a "grabbing" icon, causing a segfault.
This patch fixes this by just reverting to the stardard cursor instead.

https://bugs.freedesktop.org/show_bug.cgi?id=50487
2012-08-13 14:39:41 -04:00
Kristian Høgsberg
33d7509d37 compositor: Set WAYLAND_DISPLAY only after creating backend
The wayland backend needs to connect to the original WAYLAND_DISPLAY
before we overwrite it.

https://bugs.freedesktop.org/show_bug.cgi?id=53064
2012-08-13 14:34:01 -04:00
Scott Moreau
4272e63991 shell: Eliminate unneeded function.
Replace all occurrences of workspace_damage_all_surfaces() with
weston_compositor_schedule_repaint(). This fixes a bug exposed by
982387011f where trying to switch workspaces while there are no
surfaces on the current workspace fails to start the animation.
2012-08-13 12:57:56 -04:00
Christopher Michael
ac3e5f2feb Add support in Weston for X cursor themes.
This patch, along with the wayland patch, adds the ability to specify
a cursor theme in the weston.ini file:

[cursors]
theme=THEME_NAME

If specified, than Weston can use a specific X cursor theme for the
pointer. This relies on the 0001-Add-support-for-X-cursor-themes.patch
for wayland.

[krh: edited to use shell section and key name cursor-theme]
2012-08-13 11:12:17 -04:00
Rob Bradford
4cb88c79e0 shell: Avoid modulo by zero error in positioning algorithm
As spotted by Philipp Brüschweiler <blei42@gmail.com>
2012-08-13 11:12:17 -04:00
Rob Bradford
ac63e5bd7e shell: Enhance the basic random positioning algorithm
Place the window in a random position on the output where the first seat with
a pointer is. When calculating the random position limit the range to the
area that would ensure that the whole surface is visible. If the surface is
larger than the output then the surface is placed at the origin of the
output.

This change is based on the good work of Scott Moreau <oreaus@gmail.com>
2012-08-13 10:01:46 -04:00
Kristian Høgsberg
b29798bcab window.c: Rearrange input handlers so they appear in the right order
They were all over the place before, now they appear in protocol order.
2012-08-13 10:01:46 -04:00
Kristian Høgsberg
92374e1409 shell: Ignore unsolicited pong requests
If a client sends a pong message out of the blue, we deref ping_timer
which is NULL and then crash.  Unsolicited pong requests indicate that
something is wrong on the client, but the compositor should survide that.
2012-08-13 10:01:46 -04:00
Jan Arne Petersen
cd8cdccdd3 text: Deactivate text_model on keyboard focus lost
Assign a surface to a text_model on the text_model_activate request and
deactivate the text_model when the surface looses the keyboard focus.
2012-08-10 13:00:52 -04:00
Jan Arne Petersen
e829adc514 text: Assign text_model to a wl_seat
Add a wl_seat argument to the activate and deactivate requests of
text_method.

On activation a text_model gets assigned to the input_method of the
wl_seat specified in the activate request.
2012-08-10 13:00:52 -04:00
Jan Arne Petersen
de3b6a15c0 text: Add activate/deactivate events
Let the client know when a text model gets activated or deactiavted.
2012-08-10 13:00:52 -04:00
Jan Arne Petersen
5196374218 text: Rename text_model_manager to factory
The text_model_manager interface is just used to create text_model
instances. It is more a factory than a manager so rename it to
text_model_factory.
2012-08-10 13:00:52 -04:00
Jan Arne Petersen
72f6082313 text: Add missing callbacks for text_model events
Add all required callbacks for the text_model_listener in the editor
example.
2012-08-10 13:00:52 -04:00
Kristian Høgsberg
cb3eaae9ad compositor: Change notify_* function to take a weston_seat
Fewer indirections and derefs, and it's also more appropriate for a
backend calling into weston core to pass a weston_seat.
2012-08-10 13:00:52 -04:00
Kristian Høgsberg
05890dc621 compositor: Don't hardcode output transform when sending the event
We add a transform field to weston_output and backends can override it
when they create the output.
2012-08-10 10:09:20 -04:00
Kristian Høgsberg
16333ab0ab compositor: Remove compositor->seat
Get rid of this quick-and-dirty assumption.
2012-08-10 10:08:21 -04:00
Kristian Høgsberg
ef6f136d65 zoom: Pick the first seat in seat_list instead of compositor->seat 2012-08-10 10:07:55 -04:00
Kristian Høgsberg
5ba31891a1 xwm: Use a simple heuristic for mapping X input events to a weston seat 2012-08-10 10:06:59 -04:00
Kristian Høgsberg
f4d2f237f0 shell: Track pointer focus for all seats 2012-08-10 10:05:39 -04:00
Kristian Høgsberg
4f92c5392a compositor-x11: Move X11 core input seat into x11_compositor
There can only ever be one of these, but keep that assumption in the
X11 backend.
2012-08-10 10:04:36 -04:00
Kristian Høgsberg
7af7cede2d compositor-wayland: Move weston_seat into wayland_input 2012-08-10 10:01:33 -04:00
Kristian Høgsberg
99fd1015d0 compositor: Drop output->flags
All outputs are EGLSurface based so we can drop this detail now.
2012-08-10 09:58:02 -04:00
Kristian Høgsberg
8a01580f17 compositor-drm: Fix bad rebase
I failed to compile test my rebase of Robs compositor-drm fixes.
2012-08-09 17:19:23 -04:00
Philipp Brüschweiler
711fda86cc shell: move input panels into a designated layer
This makes the separation between panels and input panels clearer and
prevents the (desktop) panel from removing existing input panels on
redraw.

The input panel layer is below the panel layer.
2012-08-09 17:13:14 -04:00
Rob Clark
ab5b1e3149 compositor-drm: don't keep trying if hw doesn't support cursors
Not all hw supports hw cursors.  Similar to the case with sprites, if
the driver does not support it, don't keep trying and spamming the log
with error messages.

Signed-off-by: Rob Clark <rob@ti.com>
2012-08-09 17:11:03 -04:00
Rob Clark
4339add9e9 compositor-drm: don't attempt sprite for out of bounds dimensions
The drmModeAddFB2() call will fail anyways, and cause us to unnecessarily
set sprites_are_broken.

Signed-off-by: Rob Clark <rob@ti.com>
2012-08-09 17:08:40 -04:00
Rob Clark
702ffaea3e compositor-drm: skip overlay for shm buffers
They can't be imported by gbm, so no point in trying, and segfaulting
in gbm when we try to import (because it tries to deref the buffer as
a wl_drm_buffer).

Signed-off-by: Rob Clark <rob@ti.com>
2012-08-09 17:05:20 -04:00
Ander Conselvan de Oliveira
42c46466ab compositor-drm: Return the newly added mode in drm_output_add_mode()
Most of the times the caller will look at the output's mode list to get
the new mode, so just return that instead.
2012-08-09 14:40:12 -04:00
Ander Conselvan de Oliveira
dc79e6d289 compositor-drm: Check for OUTPUT_CONFIG_OFF instead of using strcmp()
A call to strcmp() is already made in output_section_done() and
output->config is set appropriately if mode is "off". There is
no need to duplicate that in create_output_for_connector().
2012-08-09 14:39:13 -04:00
Ander Conselvan de Oliveira
383b671ccf shell: Fix repaint debugging
Since weston_surface_update_transform() was changed so it called
surface_damage_below() instead of surface_damage(), the trick of
clearing the surface damage did not work anymore.

Fix this by moving the repaint surface to a special plane before
calling update_transform. The move is made manually (as opposed to
calling weston_surface_move_to_plane()) to avoid the call to
weston_surface_damage_below(). The transform update causes the
damage to be added to this special plane, which is simply ignored.
After the geometry.dirty bit is clear, the surface is moved back to
the primary plane.
2012-08-09 14:37:01 -04:00
Ander Conselvan de Oliveira
3b70b66fa9 compositor: When redrawing, don't clip opaque regions from other planes
When accumulating damage in the repaint loop, the opaque region of
surfaces in other planes is added to the overall opaque region. This
causes surface->clip to contain the areas obscured by surfaces in
other planes. Change it to contain only the opaque region of surfaces
in the primary plane

This fixes a bug where moving a window that was just moved from the
primary plane to another would leave artifacts on the screen. The
problem was that the damage generated by weston_surface_move_to_plane()
would be clipped on weston_surface_redraw(), leaving the contets below
it unchanged. Moving the overlaid surface would no longer generate
damage on the primary plane, so the contents would remain unchanged
(i.e. wrong) indefinitely.
2012-08-09 13:46:55 -04:00
Rob Bradford
84cf541b27 spring: Avoid excessive calculation loops for the spring values
To handle the case where wall clock time jumps forwards by a large amount or
backwards limit the execution of the spring calculation loop.

We do this by forcing the spring update timestamp to being no older that 1s of
the most current time we've been given. We also present a log message if the
timestamp jumps more than expected.
2012-08-09 12:51:45 -04:00
Rob Clark
5ca1a47e23 compositor-drm: handle vblanks on secondary crtc
Signed-off-by: Rob Clark <rob@ti.com>
2012-08-09 12:47:06 -04:00
Juan Zhao
19a4c2db26 image: Don't segfault when the file doesn't exist
Don't create a window when the file doesn't exist.

https://bugs.freedesktop.org/show_bug.cgi?id=52450
2012-08-09 10:55:40 -04:00
Philipp Brüschweiler
8801357332 shell: don't abuse link_layer for keeping track of input panel surfaces
Input panel surfaces were kept in a list by using layer_link of
weston_surface. This was pretty hacky and resulted in the bug that
an input panel surface was not removed from the list if it was unmapped
at the time of destruction.

This patch wraps the surface in a new input_panel_surface struct and
properly handles destruction with a signal listener.
2012-08-09 10:37:41 -04:00
Pekka Paalanen
3eb4761317 evdev: rename evdev_input_device to evdev_device
As said by krh: "Maybe we should also just call it an evdev_device
instead, shorter [and] not really ambiguous."

[krh: if my typo filled irc is going in a commit message, I'm at least going
to insert the missing words.]

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2012-08-09 10:29:18 -04:00