shell: Move maximize and fullscreen bindings to mod + SHIFT

mod + f and mod + m conflict with too many application bindings, in
particular if mod is mapped to ALT.
text: Set context->model to NULL when we deactivate text input

There's a small window between the input method (eg the on-sreen keyboard)
receiving the deactivate and destroying the context, where the keyboard may
send requests, which we forward to the destroyed input method.  Fix this
by setting the contexts model to NULL right away and then avoid sending
events if context->model is NULL.

Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=69490
Only update the surface size if a new buffer is attached

This fixes a regression caused by either 918f2dd4 or da75ee1d.  In
particular, if a client called commit without attaching a buffer and if the
compositor had already released its reference to the buffer, then a size of
0x0 would be set on the surface.  In particular, this affects the wayland
backend because it frequently sends only a frame request in order to cause
a refresh.

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Fix XWayland transient window location.

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

Signed-off-by: Axel Davy <axel.davy@ens.fr>
shell.c: Not all seats have pointers

Don't look up the pointer focus in ping_timeout_handler() if the
seat doesn't have a pointer.

Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=73490
shell: Disable exposay by default

Add a config file option to enable it, but leave it off by default.  Exposay
still triggers too many lock-ups or stuck grabs and triggers under X even
when the Wayland window doesn't have keyboard focus.
input: Handle unplugging the output for a touchscreen device

A paired touch screen will stop sending events if its corresponding
output is unplugged.  An unpaired touchscreen will pick the new primary
output.

https://bugs.freedesktop.org/show_bug.cgi?id=73637
weston.ini.man: Fix some grammar
terminal: Only set title if asprintf succeeded

Handles potential out of memory situation by skipping the title update.
This fixes the following warning:

  terminal.c: In function ‘resize_handler’:
  terminal.c:851:11: warning: ignoring return value of ‘asprintf’,
  declared with attribute warn_unused_result [-Wunused-result]

Signed-off-by: Bryce Harrington <b.harrington@samsung.com>
Cleanup stray newline in a return statement

Signed-off-by: Bryce Harrington <b.harrington@samsung.com>
gitignore: Generated files text-client-protocol.h, text-protocol.c

Signed-off-by: Bryce Harrington <b.harrington@samsung.com>
Fix XWayland crashes when opening popups

Signed-off-by: Axel Davy <axel.davy@ens.fr>
shell: Don't assign keyboard focus for seats without keyboard

Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=73570
compositor-drm: Make composite bypass work on secondary outputs

The opaque region is in surface coordinates, which we compare to the
output region, which is in compositor coordinates.  For non-primary
outputs, that means that the output region is not located at 0,0 but
something like 1920,0 instead.  That means that the output region isn't
contained in the surface opaque region and then we decide we can't scan
out from it.

Instead, compare the surface opaque region to the output region
translated to 0,0.

Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=7348i5
shell: Stop moving surfae after touch point 0 goes up

The grab stays alive as long as at least one touch point is down.  If touch
point 0 is lifted while other touch points are down, the surface will jump
around when touch point 0 is put down again.

This change marks the grab as inactive once touch point 0 is lifted
and then ignores touch events until all touch points eventually are
lifted and the grab terminates.

https://bugs.freedesktop.org/show_bug.cgi?id=73750
resizor: Don't resize if maximized

https://bugs.freedesktop.org/show_bug.cgi?id=73723
shell: Cancel popups when triggering screensaver

This is part of the fix for bug 72540.  We cancel the popup grab when the
screensaver kicks in so that the screen unlock dialog can get input events.
The bigger problem is in mesa however, where we try to allocate new buffers
as cairo-gles2 does a gratuituous (but valid) eglMakeCurrent() as we
remove the tooltip or popup-menu.

Since we removed the weston_layer with the regular surfaces, EGL blocks
waiting for a frame event that never comes.

Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=72540
Revert part of 17bccaed428ac1f6ec9f8e667175ad81e90508ff

Commit 17bccaed428ac1f6ec9f8e667175ad81e90508ff accidentally reverted
the fix for 73490 from 5cbc7634043707c3a0e442014910fc7f6db317e0.
shell: Don't start a fade animation if we don't have an output

When the last window of the X11 compositor is closed during a fade or
while locked, we'll try to start a fade back to the lock screen.  However,
if we closed the last window, there are no outputs left and the animation
will try to run with surface->output == NULL.

https://bugs.freedesktop.org/show_bug.cgi?id=73665
backlight: fix backlight_path memory leak

Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>