editor, keyboard: Add support for arrow keys

Add support for arrow keys on the virtual keyboard and make it possible
to move around the cursor in the editor example.
keyboard: Allow backspace for pre-edit text

When there is a pre-edit text delete the last character of the pre-edit
text with the backspace key.
editor: Delete selected text before adding new

When inserting new text, delete selected text first.
editor: Fix selection anchor on text deletion

When text is deleted adjust selection anchor.
Fix PDF viewer not to produce garbage windows for nonexistent files

Was calling window_flush() on redraw handler which already happens on
window redrawing.
Fix memory leak in PDF viewer
PDF viewer to run until and only when it has existing windows

I.e. not to close whole application when one of the windows
is closed.
text: Rename de/activate to enter/leave

Also add a surface argument to the enter event.
test-client: initialize input instance.

In seat_handle_capabilities, if input->pointer is not properly
initialized, then it will contain an arbitrary value and results
in the wl_pointer listener not getting registered if that value
is not 0/null.  Thus, use calloc to initialize the "input" instance.

This fixes https://bugs.freedesktop.org/show_bug.cgi?id=49937

Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
compositor: Make weston_surface_assign_output() static

This is now done as part of weston_surface_update_transform().
Protect window callbacks from deleted windows

Calling window_destroy() was able to cause segfault for
callbacks triggering afterwards.
compositor-drm: Check that that we have a valid bo for scanout

If gbm_bo_import does not return a valid buffer for usage of
GBM_BO_USE_SCANOUT don't try and scan out the surface directly.

We've caught the SHM case explicitly earlier - this is to prevent other cases
where the bo cannot be scanned out.

Signed-off-by: Rob Bradford <rob@linux.intel.com>
Require mouse release on top of frame button to trigger action

As common UI convention, allows action to be avoided by dragging
outside the button after mouse press.
shell: Fix crash when an input panel is hiding

Set the geometry.dirty on the input panel surface before calling
weston_surface_update_transform, so that the surface gets an output
assigned.
toytoolkit: Process deferred tasks on fifo order instead

Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
shell: Start the desktop-shell client in the idle handler

https://bugs.freedesktop.org/show_bug.cgi?id=55259

Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
shell: Skip clients that we forked ourselves in kill binding

When we fork a client and give one end of a socketpair, the credentials
on the socket fd comes back as ourselves.  When that happens, do not kill
the process.

Also remove superfluous variables.

Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
compositor: Add kill signal

For now it's being emitted only on the desktop shell kill binding.

Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
xwm: Plug kill signal for killing X apps

Xeyes is the counter-example that fails on that heuristic and won't be caught
on kill binding. This and the last two patches should fix:

    https://bugs.freedesktop.org/show_bug.cgi?id=53679

Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
Fix spelling errors