Commit Graph

218 Commits

Author SHA1 Message Date
Mike Blumenkrantz 3dae27bfba remove xdg-shell v5 support
this cannot coexist with xdg-shell final due to symbol collisions
2018-01-10 11:38:53 -05:00
Mike Blumenkrantz 7a3b3d23f6 xdg-shell support 2018-01-10 11:38:53 -05:00
Mike Blumenkrantz b873f9bd45 defer wl startup apps until after xwayland init completes
startup apps may require x11 connections, so ensure this is available

fix T6122
2017-10-03 12:39:03 -04:00
Mike Blumenkrantz 014db9469b use e_client_parent_set() in wl *shell parent setting methods 2017-04-07 16:07:25 -04:00
Mike Blumenkrantz d589e5217b unset wl shell resource data on destroy
ensure that destroy cannot be called multiple times for the same resource
2017-03-24 13:17:24 -04:00
Mike Blumenkrantz 7828db4575 track and delete xdg-shell client hooks
fix T5242
2017-03-10 15:55:06 -05:00
Chris Michael 96e63d863f Revert "reverse order of shell binding in wl_desktop_shell module"
Reverting the shell order commit in favor of a better approach as
discussed on IRC.

This reverts commit 9b457513e4.
2017-02-28 11:36:23 -05:00
Chris Michael 9b457513e4 reverse order of shell binding in wl_desktop_shell module
Small patch to reverse order of shell binding so that we always
support the newest shell first and fallback to older ones.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-02-28 11:26:52 -05:00
Mike Blumenkrantz cd4c3ecc5d free xdg-shell data for xdg5 surfaces 2016-12-01 12:14:25 -05:00
Mike Blumenkrantz 8173c06c4d add handler for triggering xdg-shell data cleanup on client del
in the case of internal windows, the client is deleted before any surfaces
are destroyed. this requires a special case to perform cleanups in order to
prevent client objects from leaking
2016-12-01 12:14:25 -05:00
Mike Blumenkrantz 2a9d4e73c5 correctly handle xdg surface deletion and pointer clearing
fixes crashing/leaking when deleting surfaces
2016-11-29 11:08:46 -05:00
Mike Blumenkrantz 5497fadce4 xdg6 support 2016-11-22 11:31:22 -05:00
Mike Blumenkrantz ad3d0bd8c5 split wl_desktop_shell into separate files per shell
this should make it easier to selectively disable shells, and it will
definitely simplify future shell additions
2016-10-10 11:30:52 -04:00
Derek Foreman e4da5ba56a Auto generate wayland protocol
Replaces any checked-in wayland protocol files with auto-generation.

In some cases this means renaming include files that didn't use "standard"
names, or adding missing xml files.  Any source edits are simple search and
replace, there should be no functional changes.
2016-09-26 15:23:50 -05:00
Mike Blumenkrantz 54fa1a0ca4 adjust xdg-shell window menu coords by client's coords
the coords passed in this method are relative to the window geometry
2016-07-19 14:15:21 -04:00
Mike Blumenkrantz 5546c2a425 set unmax flag for xdg shell unmaximize
ref b5576dbb8c
2016-07-13 11:26:16 -04:00
Derek Foreman 1f44a593c2 Track whether a surface is an xdg one 2016-06-29 16:19:20 -05:00
Derek Foreman 7b470c402e Set up attributes properly for wl_shell transient windows
This fixes Qt sub-windows.
2016-06-29 13:20:45 -05:00
Derek Foreman bdf1017f90 Don't send configure to wl_shell popups
This confuses Qt badly, and rightly so, because we shouldn't be
doing it.
2016-06-23 11:26:57 -05:00
Derek Foreman 453e6adc33 Use e_client_util_is_popup for checking wayland clients
All the different popup types are tested by the helper function,
the current wayland tests were missing some.
2016-06-23 11:22:47 -05:00
Derek Foreman 11796c8b88 Update some wl_shell window handling logic
Our xdg_shell implementation has received some fixes that are also
applicable to wl_shell.  Qt still uses wl_shell, so we do have a test
case, and do need to keep it up to date.

This copies some window attributes, clamping logic, and diagnostic prints
from the xdg_shell implementation.
2016-06-21 12:33:49 -05:00
Mike Blumenkrantz 0f022976e0 use pending wl maximize value to determine maximize flag in xdg configure
fixes some cases where fast configures would break maximizing
2016-06-20 16:04:10 -04:00
Derek Foreman b6819e5a77 Fix wl_shell popup livelock
Trying to put wl_shell popups in the popup layer results in stacking
problems later and a never ending loop.

Just don't.

fix T3433
2016-06-16 14:37:15 -05:00
Derek Foreman 4f8dd3f1e5 Fix wl_shell clamping rules
The current clamping logic clamps submenus so that they're contained
within their parent instead of adjacent to them.
2016-06-15 16:39:08 -05:00
Derek Foreman 2463ce8b43 Fix crash in wl_shell surface destroy
wl_shell doesn't set up shell.data, but this destructor is shared
with xdg_shell which does.
2016-06-15 15:19:32 -05:00
Mike Blumenkrantz ac86429a2c manage pending state list more effectively in wl shell
fix T3433
2016-05-10 11:34:48 -04:00
Mike Blumenkrantz 33503babc8 apply xdg-shell activated state based on popup surface focus hierarchy
if a popup is activated, the originating toplevel surface should also remain
focused
2016-04-27 11:28:07 -04:00
Mike Blumenkrantz 53320330c6 protect xdg-shell functions from accessing deleted client data
this is mostly an issue for internal windows since they get deleted by
the compositor before the client is aware
2016-04-25 14:11:24 -04:00
Mike Blumenkrantz 6aee63d1dc redo wl (xdg)shell surface ping
- remove (wrong) global variables which tracked client-specific resources
- start ping upon creating a shell surface
- track client-specific shell resources on a per-client basis
2016-04-18 15:37:22 -04:00
Mike Blumenkrantz a86af80da0 trivial wl shell module cleanups
remove some old comments, don't pass global data as function param
2016-04-18 15:30:03 -04:00
Mike Blumenkrantz 536a3a7ff6 make startup/restart app exec timing protocol-specific
this allows different display protocols to start their applications at
different times to ensure that any initialization has completed prior to
starting anything requiring a window

fix T3475
2016-04-18 15:27:47 -04:00
Mike Blumenkrantz 10bd6e5fcc handle maximize_anims_disabled for client-side maximize toggles
fix T3434
2016-04-11 14:38:03 -04:00
Mike Blumenkrantz 63af4ea865 buffer server-side (un)maximize commands to ensure synchronization in wayland
maximize is client-initiated and compositor-enforced in wayland, meaning that a
maximize should only be acted upon in the compositor after the client has
acknowledged that it has transitioned into the maximized state (likely removing
part of its csd region) and has resized itself to match the expected maximize
size

fix T3297
2016-04-08 16:08:32 -04:00
Mike Blumenkrantz 992e04feb2 wayland client maximize/fullscreen cleanups
ref da74e690f0
2016-04-05 16:54:04 -04:00
Mike Blumenkrantz da74e690f0 redo xdg shell to enforce double buffering of client-side configure serials
xdg shell configure states (maximize, fullscreen) return a client ack when the
client has applied the state. the ack, followed by the next surface commit,
indicates that the surface is ready to be transitioned into the configured state
2016-04-05 15:05:10 -04:00
Mike Blumenkrantz c27e033d66 remove clamping for wl xdg popup configures
I don't remember why I added it but it's wrong and so was I
2016-03-31 14:58:55 -04:00
Mike Blumenkrantz 2bf2772712 don't set wl xdg popups to POPUP layer, set popups as placed on creation
resolves random popup placements
2016-03-31 14:06:29 -04:00
Mike Blumenkrantz 607975ccc0 enforce wl xdg popup stacking relative to parent stacking 2016-03-31 14:05:47 -04:00
Mike Blumenkrantz 336721e693 set destructor for xdg popups when setting implementation
popups never get deleted without this
2016-03-31 14:04:47 -04:00
Mike Blumenkrantz 56121908d5 remove wl xdg popup new_client stuff from get_popup method
ref d7f7eb9448
2016-03-31 12:54:21 -04:00
Mike Blumenkrantz d7f7eb9448 redo wayland client unignore mechanism
wayland clients were previously set as ignored until they obtained
a shell surface in order to avoid early execution of things like placement.

this had no effect.

the ignore must last until the first commit, at which point surfaces have been
sized and can be placed accurately without needing to move the surface around
a lot of times due to resize/frame adjust/birthdays
2016-03-24 16:43:32 -04:00
Derek Foreman 6f3e670f75 Fix xdg-shell destructors
_e_shell_surface_destroy() is already the implementation's destructor, so
it'll be called when the surface is destroyed anyway.  What we have to do
here is just call wl_resource_destroy(resource) - which will call that
function for us.

It'll also do us the favor of actually destroying the resource and
removing it from the client's resource list so we won't get a SECOND call
to _e_shell_surface_destroy() on client exit.
2016-02-18 12:31:31 -06:00
Mike Blumenkrantz f54bf1ec60 allocate E_Shell_Data for all xdg surfaces (popups)
this crashes if the shell surface does not have shell data
2016-01-21 17:21:31 -05:00
Mike Blumenkrantz 0df8c94572 set want_focus for xdg popup surfaces on creation
these types of surfaces should grab focus as early as possible, and
setting the flag at this time ensures that it will be handled during
the next client eval
2016-01-19 13:45:08 -05:00
Mike Blumenkrantz d52fffeec9 call xdg surface map when creating a surface for visible internal windows
if windows are created during startup, they will attempt to show themselves
before xdg surface operations are available, leading to a scenario where they
will never successfully map themselves. if the elm win object is visible, this
indicates a mapped internal window, so directly call the map function at this
time to make the window visible
2016-01-19 13:43:06 -05:00
Derek Foreman 3304ea7b6c Remove inappropriate usage of %m
Summary:
printf %m stringifies and prints errno.  This is actually hugely confusing
if used in error messages after failures that don't set errno.

You may get "Success", or you may get an errno that was harmless ages
ago.

Some of the functions followed by %m have only some error paths that
set errno, or make multiple system calls that can set errno
independently - knowing the errno at failure time is unlikely to be
useful in these cases.

Reviewers: devilhorns, zmike

Reviewed By: zmike

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D3571
2016-01-14 12:41:47 -05:00
Chris Michael e40033be0a Fix type of size fields for E_Shell_Data
In the xdg_surface_configure_send function, the size params
(width/height) come in as int32_t. This patch makes the E_Shell_Data
fields for width & height match those (else we end up with compiler
warnings when comparing int32_t to uint32_t).

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2015-12-15 10:20:33 -05:00
Mike Blumenkrantz bfd11c68ca add wayland shell private data for managing shell-specific data
also cache xdg configure infos and avoid sending duplicate events
2015-12-10 13:24:55 -05:00
Derek Foreman 81ff082e0d Stop using MIN macros when choosing versions for wayland resources
Summary:
libwayland-server.so will post an error if the requested version
is higher than the supported one anyway, so there's no point in
doing this.

Using MIN() to pick versions is a client side idiom.

 #kansas

Reviewers: zmike, devilhorns

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D3385
2015-11-26 20:12:47 -05:00
Mike Blumenkrantz a3266d5d89 ref clients while a wayland shell surface exists
in the case where a client is deleted, it's possible that the shell
surface may persist longer than the duration of the normal client delete
cycle, so it's necessary to ensure that the client will continue to exist
until the shell surface has been destroyed
2015-11-20 15:04:07 -05:00