Commit graph

91 commits

Author SHA1 Message Date
Kristian Høgsberg 31b4a0dcc0 protocol: Add missing xml files to EXTRA_DIST
Reported by Sven Joachim <svenjoac@gmx.de>
2012-02-26 22:29:18 -05:00
Pekka Paalanen 79346ab3a5 shell: wait for desktop-shell init before fade in
On Raspberry Pi, weston-desktop-shell is so slow to start, that the
compositor has time to run the fade-in before the wallpaper is up. The
user launching Weston sees the screen flipping to black, the fbcon
fading in, and then the desktop popping up.

To fix this, wait for the weston-desktop-shell to draw
everything before starting the initial fade-in. A new request is
added to the private desktop-shell protocol to signal it. If a
desktop-shell client does not support the new request, the fade-in
happens already at bind time.

If weston-desktop-shell crashes, or does not send the 'desktop_ready'
request in 15 seconds, the compositor will fade in anyway. This should
avoid a blocked screen in case weston-desktop-shell malfunction.

shell_fade_startup() does not directly start the fade-in but schedules
an idle callback, so that the compositor can process all pending events
before starting the fade clock. Otherwise (on RPi) we risk skipping part
of the animation. Yes, it is a hack, that should have been done in
window.c and weston-desktop-shell instead.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2013-05-22 18:07:30 -04:00
Pekka Paalanen 419e2bae92 protocol: improve sub-surface spec wording
Mention, that sub-surfaces are not clipped to the parent.
Be more accurate on surface commit vs. apply state.
Mention the initial stacking order.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2013-05-20 10:30:58 -04:00
Pekka Paalanen 5545320c36 protocol: remove an unused sub-surface error code
This was left over from allowing nesting.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2013-05-17 16:22:24 -04:00
Pekka Paalanen 16abf6a4d4 protocol: set_desync should flush
wl_subsurface.set_desync should apply the cached wl_surface state.
Otherwise, the sub-surface may be stuck: a commit on the parent surface,
if desynchronized, will not commit the sub-surface because it is
desynchronized, too. A commit on the sub-surface may not happen, if it
is waiting for the frame callback from the previous commit.

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2013-05-17 16:21:50 -04:00
Pekka Paalanen 2396aec684 protocol: add sub-surfaces
Add protocol for sub-surfaces, wl_subcompositor as the global interface,
and wl_subsurface as the per-surface interface extension.

This patch is meant to be reverted, once sub-surfaces are moved into
Wayland core.

Changes in v2:

- Rewrite wl_subcompositor.get_subsurface description, and move mapping
  and commit details into wl_subsurface description. Check the wording
  in wl_subsurface.set_position description.

- Add wl_subsurface.set_commit_mode request, and document it, with the
  commit_mode enum. Add bad_value error code for wl_subsurface.

- Moved the protocol into Weston repository so we can land it upstream
  sooner for public exposure. It is to be moved into Wayland core later.

- Add destroy requests to both wl_subcompositor and wl_subsurface, and
  document them. Experience has showed, that interfaces should always
  have a destructor unless there is a good and future-proof reason to not
  have it.

Changes in v3:

- Specify, that wl_subsurface will become inert, if the corresponding
  wl_surface is destroyed, instead of requiring a certain destruction
  order.

- Replaced wl_subsurface.set_commit_mode with wl_subsurface.set_sync and
  wl_subsurface.set_desync. Parent-cached commit mode is now called
  synchronized, and independent mode is desynchronized. Removed
  commit_mode enum, and bad_value error.

- Added support for nested sub-surfaces.

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2013-05-10 14:05:59 -04:00
Jan Arne Petersen cc75ec11ca text: Rename input_method to wl_input_method
Also rename input_method_context to wl_input_method_context,
input_panel to wl_input_panel and input_panel_surface to
wl_input_panel_surface.

Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
2013-05-02 17:18:46 -04:00
Jan Arne Petersen 2f51d8a2ff text: Improve protocol documentation.
Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
2013-05-02 17:12:21 -04:00
Jan Arne Petersen 70d942b4d7 text: Rename ::set_panel to ::set_overlay_panel
Also add documentation to input_panel_surface::set_overlay_panel.

Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
2013-05-02 17:12:02 -04:00
Jan Arne Petersen 62ece76b1e text: Rename text_input to wl_text_input
Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
2013-05-02 17:06:27 -04:00
Jan Arne Petersen 00191c7c4a text: Fix serial handling
Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
2013-05-02 16:41:48 -04:00
Jan Arne Petersen 7cd29e199a text: Add output argument to set_toplevel
Allow to specify an output for a toplevel  input panel surface.

Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
2013-05-02 16:41:47 -04:00
Jan Arne Petersen 14da96bf81 text: Add support for panels following the cursor
Add input_panel_surface::set_panel to specify input panel surfaces which
are overlaying the application and are following the input cursor.

Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
2013-05-02 16:41:47 -04:00
Jan Arne Petersen 85ecaa5d75 text: Add "none" preedit-style
Use "default" preedit style as default. "None" is used when the
composing text should look like non-composing text.

Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
2013-05-02 16:23:46 -04:00
Jan Arne Petersen 78d00e45cc text: Rename text_model to text_input
Also rename text_model_factory to text_input_manager.

Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
2013-05-02 16:23:35 -04:00
Jan Arne Petersen 7ef8effca5 text: Order requests and events in a nice way
Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
2013-05-02 16:23:14 -04:00
Jan Arne Petersen fa3573852d text: rename text_model::commit to commit_state
Use ::commit_state as a request name to make clear what is commited.

Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
2013-05-02 16:22:36 -04:00
Krzesimir Nowak 8418a0cc8d text: Fix some text and input-method docs
Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
2013-05-02 16:22:22 -04:00
Krzesimir Nowak f62e8cfae7 text: Fix password content hint value
0xc in this case was a combination of "autocapitalization" (0x4) and
"lowercase" (0x8) instead of "hidden_text" (0x40) and "sensitive_data"
(0x80).

Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
2013-05-02 16:22:07 -04:00
Jan Arne Petersen ece6b5af51 text: Add language and text-direction to protocol
Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
2013-05-02 16:21:18 -04: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 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 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 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 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
U. Artie Eoff 65e7e7a65b tests: Define and implement a test protocol extension.
The weston test extension, called weston-test.so, can be loaded
from the "modules" configuration option on the command line
or in the .ini file.

Clients can bind to the "wl_test" interface to interact with
the weston test extension.

Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
2012-12-11 15:29:52 -05:00
Jan Arne Petersen 337df952f8 text: Add support for forwarding key events
Allow an input method to forward (unfiltered) key and modifier events
from the hardware keyboard to the client.

Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
2012-11-27 13:10:10 -05:00
Jan Arne Petersen 466b9c1047 text: Add support for grabbing the keyboard
Add support for requesting hardware input into an input method.

Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
2012-11-27 13:09:07 -05:00
Jan Arne Petersen d9be93b964 text: Rename and extend text_model key event
Rename the key event in text_model to keysym and add serial, time and
modifiers arguments. Add a modifiers_map event to transfer an array of
0-terminated modifier names, so that a mapping of modifiers to the
modifier bit mask is possible.

Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
2012-11-27 13:02:26 -05:00
Martin Olsson 3b132e358f Fix spelling errors 2012-10-04 11:24:50 -04:00
Jan Arne Petersen 680275fbf1 text: Rename de/activate to enter/leave
Also add a surface argument to the enter event.
2012-09-25 11:24:49 -04:00
Jan Arne Petersen 7bbdffabc7 text: Improve text protocol documentation
Add some missing descriptions to the text protocol file.
2012-09-13 16:34:18 -04:00
Jan Arne Petersen c1e481efb1 text: Add reset requets to protocol
Add a reset request to the text_model interface and a reset event to the
input_method_context interface. Use it to reset the pre-edit buffers in
the example keyboard when the cursor is moved in the example editor
client.

Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
2012-09-12 16:52:53 -04:00
Jan Arne Petersen ce8a4433f5 text: Add support for control keys to the protocol
Add key event to the text_model interface and a key request to the
input_method_context interface. Implement it in the example editor
client and the example keyboard.

Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
2012-09-12 16:52:41 -04:00
Jan Arne Petersen e202bae9d3 text: Add delete_surrounding_text to protocol
Add delete_surrounding_text event in the text_model interface and the
request in the input_method_context interface. Implement it in the
example editor client and in the example keyboard so that the backspace
key works with it.

Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
2012-09-12 16:51:08 -04:00
Jan Arne Petersen 43f4aa8cab text: Add support for pre-edit string
Add support of preedit-string to the example editor client. Also add a
preedit_string request to the input_method_context interface and use
that in the example weston keyboard to first create a pre-edit string
when entering keys and commit it on space.

Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
2012-09-12 16:50:44 -04:00
Jan Arne Petersen 30b66ef1fd text: Split text and input-method protocols
It makes sense to split the interfaces in a text and a input-method
protocol for now (only the text protocol needs to be used in toolkits).

Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
2012-09-12 16:48:59 -04:00
Jan Arne Petersen cb08f4d844 text: Fix set_surrounding_text request
Add cursor and anchor positions as arguments to the set_surrounding_text
request. The cursor and anchor positions are relative to the surrounded
text, so it does not make sense to have that separate. Remove the
separate set_cursor_index and set_selected_text requests. Also update
the corresponding event in input-method-context and add support for it
in the weston example keyboard.

Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
2012-09-12 16:38:00 -04:00
Jan Arne Petersen ae92a7a1a0 text: Add some documentation to the text protocol
Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
2012-09-12 16:35:07 -04:00
Jan Arne Petersen 620cd62cbd text: Introduce input_method_context interface
Add an input_method_context interface which is the representation of a
text_model on input_method side.

Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
2012-09-12 16:34:59 -04:00
Jan Arne Petersen 4c26518ad1 text: Remove surface arg in create_text_model
Remove the wl_surface argument from create_text_model request. The
wl_surface is specified as an argument in the activate request instead.

Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
2012-09-12 16:28:04 -04:00
Jonas Ådahl e9d2250549 shell: Introduce workspace manager interface
The workspace manager interface purpose is to provide clients with
control and knowledge about the current workspace state. Initially only
one function and one event exists; moving a surface and state updated
event. A workspace is represented as an index in a 1 dimensional array.

A client keeps track of the state by being broadcasted events when the
state changes, currently limited to current workspace or number of
workspaces available.

A client can send an asynchronous request to the manager asking to move
a surface to workspace identified by an index. It is up to the shell to
actually move it.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
2012-08-31 19:51:49 -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