Commit Graph

2854 Commits

Author SHA1 Message Date
Kristian Høgsberg
142d546c14 compositor: Don't free config_file before we done using it 2013-02-21 21:10:36 -05:00
Kristian Høgsberg
762b166c35 xwm: Only call set_fullscreen if the window is mapped
If we get a fullscreen client message before we map the window, we don't
have a shell surface yet.  Just dont call set_fullscreen yet, and rely on
xserver_map_shell_surface() to fullscreen it when we map it.
2013-02-21 20:18:37 -05:00
Kristian Høgsberg
cb4685bbd1 Pass argc and argv to modules
This lets modules parse options from the command line.
2013-02-20 15:37:49 -05:00
Kristian Høgsberg
4172f668e7 Pass argc pointer to parse_options()
This lets us keep argc up to date as the backend picks out arguments
from the argv array.
2013-02-20 15:27:49 -05:00
Jan Arne Petersen
d5a97ae053 tests: Fix text-test
Updated to changed text protocol.

Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
2013-02-20 15:12:34 -05:00
Kristian Høgsberg
a1377cf198 Add missing builddir includes for version.h
af4f2aaf19 broke this
2013-02-20 14:47:43 -05:00
Pekka Paalanen
6f41b0727c window: fix display_acquire_window_surface()
Make sure that display_acquire_window_surface() creates the Cairo
surface as necessary. Otherwise surface->toysurface can be NULL.

This fixes weston-screensaver fullscreen mode. Demo mode was not
affected as it uses window decorations, and so the Cairo surface is
created. This regression was introduced by:

commit 0c4445ba57
Author: Pekka Paalanen <ppaalanen@gmail.com>
Date:   Wed Feb 13 16:17:23 2013 +0200

    window: create Cairo surfaces on demand for redraw

Reported-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2013-02-20 14:13:41 -05:00
Kristian Høgsberg
7cc3d846f4 compositor-x11: Only try to fullscreen if WM has _NET_WM_STATE_FULLSCREEN
If the window manager doesn't support _NET_WM_STATE_FULLSCREEN, the
fullscreen protocol won't work and we end up waiting indefintely for a
confiure event that doesn't come.

Only try to fullscreen if we have _NET_WM_STATE_FULLSCREEN, and only
wait for map if we're fullscreen.

https://bugs.freedesktop.org/show_bug.cgi?id=61133
2013-02-19 21:19:04 -05:00
Kristian Høgsberg
97a5614563 weston.ini: Use 'modeline' key for modeline example
When specifying a modeline, use the modeline key.  Make the example
weston.ini do that.
2013-02-18 20:10:35 -05:00
Giulio Camuffo
8aa16174e2 shell: Do not hang when mapping a popup twice
When calling shell_map_popup() more than one time on the same shell_surface
the parent transform was getting added more than one time to the transform
list, resulting in an infinite loop when going through the list with
wl_list_for_each in weston_surface_update_transform_enable().
This commit removes the old transform before adding it again.
2013-02-18 16:56:40 -05:00
Rafal Mielniczuk
db790573ad compositor: set data_device keyboard focus in seat_get_keyboard
Because seat_get_keyboard is called after initial
weston_surface_activate, wl_data_device_set_keyboard_focus
fails to send data offer for newly connected client due to
wl_seat.focus_resource being NULL.

This patch calls wl_data_device_set_keyboard_focus
in seat_get_keyboard, so it can send data offer for
newly created client (when wl_keyboard.resource_list
and wl_seat.focus_resource are properly set up).

https://bugs.freedesktop.org/show_bug.cgi?id=60617
2013-02-18 16:52:59 -05:00
Kristian Høgsberg
8764466c6b udev-seat: Simplfy enable/disable interface a bit
We always call enable_udev_monitor and add_devices together and always
disable_udev_monitor and remove_devices together.  Let's just have one
entry point for enable and one for disable.
2013-02-18 16:50:19 -05:00
Kristian Høgsberg
7e597f22d5 compositor-fbdev: Use udev_seat
Let's share the udev input device discovery code.
2013-02-18 16:35:38 -05:00
Kristian Høgsberg
98cfea6f49 compositor-drm: Move udev_seat to its own file
We get to move the input code out of compositor-drm.c and we'll be
able to share it with the fbdev backend.
2013-02-18 16:26:19 -05:00
Kristian Høgsberg
e809103e0f compositor-drm: Rename a few evdev_* functions to udev_seat_*
We used to have a bit of naming trouble when the protocol object was called
wl_input_device and the individual evdev devices were call evdev_device.
And we didn't have a drm_seat.  Now that we've fixed all that, it's clear
that the drm_seat is all about udev discovery and hotplug of evdev devices,
so let's call it udev_seat instead.
2013-02-18 16:26:19 -05:00
Quentin Glidic
bb41005259 configure.ac: Make xwayland tests depend on xwayland
Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
2013-02-18 16:03:51 -05:00
Kristian Høgsberg
2f07ef6963 xkb: Don't call exit on failure in weston_compositor_xkb_init()
This will exit without cleaning vt modes and leave the system stuck.

https://bugs.freedesktop.org/show_bug.cgi?id=60817
2013-02-18 15:29:35 -05:00
Kristian Høgsberg
4fd273f400 compositor-x11: Fix pointer type warning 2013-02-18 15:29:35 -05:00
Kristian Høgsberg
506238454b compositor-drm: Remember to drop master in drm error handling
Otherwise we'll kill whatever other display sever we're switching back to.
The tricky thing here is that we never explicitly set drm master in the
startup path, we get that implicitly from being the first to open the
drm device.  Even so, we need to drop it before switching VTs.
2013-02-18 15:29:35 -05:00
Kristian Høgsberg
4905efdc99 src/Makefile.am: Use $(libdir) instead of @libdir@
This allows overriding prefix and libdir at make time.  Noticed
by David Herrmann.
2013-02-18 15:29:35 -05:00
Kristian Høgsberg
af4f2aaf19 Install header files and pkg-config file for external modules
This patch installs the three header files that define the compositor
plugin interface as well as a pkg-config file.  This allows
building weston plugins outside the weston tree.  We currently don't make
any guarantees about the plugin API/ABI except that within a stable
branch we won't break it.
2013-02-18 15:29:35 -05:00
Marcin Slusarz
554a0da74a compositor: Use libunwind if available for better backtraces
libunwind has a dwarf parser and automatically queries the dlinfo
for location of dlopened modules.  The resulting backtrace is much
better and includes stack frames in dynamically loaded modules.

krh: Originally submitted for Xorg, adapted for weston:

  http://lists.x.org/archives/xorg-devel/2013-February/035493.html

Note this require libunwind at least 1.1 to get the pkg-config files.

Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
2013-02-18 15:29:17 -05:00
Jan Arne Petersen
1cc9e08d2f text: Split out cursor_position
Add an extra cursor_position, which also allows to change the anchor
(for slections). Change the index type to int to allow setting it before
the beginning of a commited string.

The cursor should not be moved as a direct repsonse to this event but
atomically on the next commit_string event.

Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
2013-02-15 17:08:01 -05:00
Jan Arne Petersen
964b517c9b text: Rename set_micro_focus request
Rename set_micro_focus to set_cursor_rectangle to make more clear, what
it refers to.

Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
2013-02-15 17:07:42 -05:00
Jan Arne Petersen
6138197337 text: Add show/hide_input_panel requests
Allows to show/hide the input panel (virtual keyboard) more independent
of focus (some applications might to require additionaly click on a
focused entry to show the input panel).

Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
2013-02-15 17:07:35 -05:00
Jan Arne Petersen
0eabcaafae text: Add commit request
Allows for atomic state changes. Updated surrounding text, content type
and micro focus is taken into account all at once at commit.

Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
2013-02-15 17:07:03 -05:00
Jan Arne Petersen
f255165bd4 text: Remove unused requests/events
Put them back in, when we know what arguments they will have.

Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
2013-02-15 17:06:48 -05:00
Jan Arne Petersen
ffbb20f730 text: Move input_panel interface to input-method
Move the input_panel interface from desktop-shell to input-method (since
it is not really tied to desktop-shell).

Add an input_panel_surface interface like wl_shell_surface to make it
easier to extend it. Also add a parameter to the set_toplevel request to
be able to specify where to show an input panel surface on the screen.

Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
2013-02-15 17:05:04 -05:00
Jan Arne Petersen
23ccfb3ef9 shell: Do not hang after setting input_panel twice
Ignore multiple calls with the same surface in input_panel_set_surface.

Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
2013-02-15 17:03:18 -05:00
Jan Arne Petersen
af7b6c9c6d shell: Do not crash when hiding input_panel
Allow an input panel to attach a NULL-buffer for hiding.

Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
2013-02-15 17:03:08 -05:00
Jan Arne Petersen
3fb6e71814 editor: Add support for backspace keysym events
Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
2013-02-15 17:02:48 -05:00
Jan Arne Petersen
8746ba0d29 doc: add some more text protocol documentation
Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
2013-02-15 17:02:42 -05:00
Jan Arne Petersen
a75a789fc1 text: fix weston key bindings with input methods
Add a struct weston_keyboard, to handle the input method grab.

Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
2013-02-15 17:02:26 -05:00
Jan Arne Petersen
ab2b01429e simple-im: fix for protocol changes
Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
2013-02-15 17:01:20 -05:00
Jan Arne Petersen
2dc3b3fc9f keyboard: add support for invoke_action
Set the pre-edit cursor on the clicked index on invoke_action.

Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
2013-02-15 17:01:12 -05:00
Jan Arne Petersen
3489ba9c21 editor: add support for invoke_action
Call invoke_action request when a currently composed word is clicked.

Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
2013-02-15 17:00:54 -05:00
Jan Arne Petersen
adfedc1965 text: add support for invoke_action request
Add a request to be called by the client when the word currently being
composed is tapped by the user. Input methods often use this information
to offer more word suggestions to the user.

Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
2013-02-15 17:00:46 -05:00
Jan Arne Petersen
0558a93eee editor: Add content type example
Set the content type purpose to numeric of the second entry.

Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
2013-02-15 17:00:29 -05:00
Jan Arne Petersen
e475f29330 keyboard: Add support for a numeric layout
Add support for a numeric key layout, which is used for some numeric
content purpose types.

Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
2013-02-15 17:00:20 -05:00
Jan Arne Petersen
26ffa814d9 text: Add content type support to text protocol
Support content types in text protocol. Content is defined by a hint
bitmask and a purpose field.

Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
2013-02-15 17:00:15 -05:00
Jan Arne Petersen
0a1cf393c6 editor: add support for pre-edit styling
Add pango dependency to the example and use pango for text handling.

Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
2013-02-15 16:57:37 -05:00
Jan Arne Petersen
49a3fb3d1d keyboard: Add support for pre-edit styling
Adds a button to the keyboard to support different styles of pre-edit
styling.

Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
2013-02-15 16:55:58 -05:00
Jan Arne Petersen
4a17fae8e7 editor: support commit on reset
Commit pending pre-edit text when focus-out or changing the cursor
location.

Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
2013-02-15 16:55:47 -05:00
Jan Arne Petersen
c7d2a9839b text: add serial argument to text protocol
The serial argument will allow to ignore outdated events from before a
reset request.

Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
2013-02-15 16:55:37 -05:00
Jan Arne Petersen
4653531e7a text: add pre-edit styling support to protocol
Also add a separate preedit-cursor event and add a commit argument to
preedit-string to allow to support commit on reset. Fix editor and
keyboard example to adapt to the protocol changes.

Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
2013-02-15 16:55:27 -05:00
Ander Conselvan de Oliveira
18639f8d4a shell: Set the DPMS state if the screensaver fails to launch or dies
The lock hook in desktop-shell only changes the DPMS state the second
time it is called, because during the first time it launches the
screensaver and wakes the compositor again when the screensaver surface
is configured. However, if the screensaver fails to launch, the output
is left in an enabled state, even thought there's no content being
displayed on the screen.

Fix this by disabling the outputs when the screensaver dies if the
shell is still locked.

https://bugs.freedesktop.org/show_bug.cgi?id=60084
2013-02-15 14:06:15 -05:00
Kristian Høgsberg
8e7adbff68 compositor-x11: Wait for configure_notify for fullscreen
Some window managers (kwin at least) don't give us our final fullscreen
size before map_notify.  Currently we stop waiting for configire_notify
once we get mapped and in case of kwin that means we don't receive our
fullscreen size configure_notify.  With this patch, if we don't get a
configure_notify before map_notify, we just wait for the first one after
map_notify and hope that's our size.

https://bugs.freedesktop.org/show_bug.cgi?id=60608
2013-02-14 22:03:03 -05:00
Kristian Høgsberg
81585e9d2a xwm: Don't leak pending.input region
It's not really a leak, since the region is always a rectangle, but let's
play by the rules.
2013-02-14 22:03:02 -05:00
Kristian Høgsberg
25bb696fc8 xwm: Fix silly region math
We were setting up the opaque region to be the window size and then
intersecting with the opaque rectange that's always contained in the window
rectangle.  Just initialize to the opaque rectangle.
2013-02-14 22:03:02 -05:00
Kristian Høgsberg
d8b617deea xwm: Fix input region regression from commit changes
This must be the last regression from the surface commit changes.  We
need to set the pending.input region, otherwise the region will be
overwritten on commit.

https://bugs.freedesktop.org/show_bug.cgi?id=60610
2013-02-14 21:56:48 -05:00