Commit Graph

186 Commits

Author SHA1 Message Date
Mike Blumenkrantz 4c311d301e 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-26 10:57:00 -04:00
Mike Blumenkrantz 0565f5aa5b 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-26 10:56:58 -04:00
Mike Blumenkrantz 84ee6c0300 trivial wl shell module cleanups
remove some old comments, don't pass global data as function param
2016-04-26 10:56:58 -04:00
Mike Blumenkrantz b5ef01ddac 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-26 10:56:58 -04:00
Mike Blumenkrantz 0bc84ac6b0 remove clamping for wl xdg popup configures
I don't remember why I added it but it's wrong and so was I
2016-04-26 09:51:07 -04:00
Mike Blumenkrantz 15806cbbf9 don't set wl xdg popups to POPUP layer, set popups as placed on creation
resolves random popup placements
2016-04-26 09:50:53 -04:00
Mike Blumenkrantz bf6ba1b003 enforce wl xdg popup stacking relative to parent stacking 2016-04-26 09:50:46 -04:00
Mike Blumenkrantz 0656da9d2f set destructor for xdg popups when setting implementation
popups never get deleted without this
2016-04-26 09:50:42 -04:00
Mike Blumenkrantz aa686641b1 remove wl xdg popup new_client stuff from get_popup method
ref d7f7eb9448
2016-04-26 09:50:08 -04:00
Mike Blumenkrantz d1568b832f 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-04-26 09:48:29 -04:00
Derek Foreman e8c3320712 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-03-09 12:08:27 -05:00
Mike Blumenkrantz a28eae0ca9 allocate E_Shell_Data for all xdg surfaces (popups)
this crashes if the shell surface does not have shell data
2016-02-02 13:36:24 -05:00
Mike Blumenkrantz 7b4b823758 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-02-02 13:34:09 -05:00
Mike Blumenkrantz f63ebeb939 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-02-02 13:34:05 -05:00
Chris Michael 59762676a8 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>
2016-02-02 13:32:31 -05:00
Mike Blumenkrantz 09d5ca9e25 add wayland shell private data for managing shell-specific data
also cache xdg configure infos and avoid sending duplicate events
2015-12-11 16:48:29 -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
Mike Blumenkrantz 89a789fe3d redo CSD for wayland clients to use comp object frame geometry
this fixes issues with client placement and is a more native solution
than the previous hacks
2015-09-29 18:53:03 -04:00
Seunghun Lee 26d352f219 Add module "wl_text_input" for supporting *wl_text_input* and *wl_input_method* protocol in wayland.
Summary:
this patch allow to use virtual keyboard such as weston-keyboard.
it was tested in wayland verion 1.6.

Test Plan:
<prerequisite>
- Configure with --enable-wl-text-input
- edit configuration file, e.cfg to enable module wl_text_input.

1. run enlightenment as a wayland display server.
2. run weston-keyboard.
3. run weston-editor.

Reviewers: raster, Sergeant_Whitespace, devilhorns, zmike

Reviewed By: zmike

Subscribers: ManMower, Sergeant_Whitespace, cedric, jihoon

Differential Revision: https://phab.enlightenment.org/D2275
2015-08-20 14:55:55 -04:00
Mike Blumenkrantz 3f13b6889d replace existing usage of x/wl_comp_data with corresponding globals 2015-08-13 16:05:57 -04:00
Chris Michael d4f9ee417d wl_desktop_shell: Formatting
NB: No functional changes

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-07-28 14:37:26 -04:00
Mike Blumenkrantz 0d19a5914b apply csd sizing transform for wayland configure events
when not resizing, the sizes passed to configure should be based on the
window size and not the surface size. in order to calculate this, it's
necessary to keep track of the last-known window geometry for non-maximized
states and create offsets with which to calculate new sizes

this fixes directional maximizes as well as unmaximizing
2015-07-24 16:35:21 -04:00
Mike Blumenkrantz 0321fd690e do not send duplicate configures for wayland clients during maximize
this seems to not have caused any real issues, but it made debugging
more of a pain and is unnecessary connection noise
2015-07-24 16:33:33 -04:00
Mike Blumenkrantz 7aea28a86b do not attempt to remove wl xdg popup clients from focus stack
these have never been added to the focus stack, so removing them is useless
2015-07-21 14:19:39 -04:00
Mike Blumenkrantz bd776b157f add e_client_unignore() for triggering events when unignoring a client
mainly for use in wayland compositing since all surfaces are ignored
until they get a shell surface or a commit
2015-07-17 15:30:30 -04:00
Mike Blumenkrantz d7c58215f4 set wl client surface pointer in surface create method
remnant from when clients were created by the shell
2015-06-25 20:04:31 -04:00
Mike Blumenkrantz eec5cf6a67 remove E_Comp_Data typedef, use backend-specific typedefs unconditionally
this turned into a bit of a charlie-foxtrot due to constant pointer aliasing
in the wl compositor codebase

no functional changes
2015-06-25 20:04:31 -04:00
Chris Michael a57ce9ca85 wl-desktop-shell: Don't crash when trying to place popup menus in QT apps
This is a partial fix for T2517. It fixes the crash, but does not
address popup menu placement.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-06-25 12:05:05 -04:00
Chris Michael 475a246ea9 wl-desktop-shell: Remove useless return at end of function
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-06-25 09:45:28 -04:00
Chris Michael 609fa7100d wl-desktop-shell: Fix formatting
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-06-25 09:30:59 -04:00
Chris Michael d73b3d1e70 wl-desktop-shell: Fix popup menu placement for xdg surfaces
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-06-09 09:43:34 -04:00
Chris Michael db66433374 wl-desktop-shell: Fix T2357: Update xdg_shell for version 5
Summary: This fixes the Enlightenment wayland desktop shell by
updating it to support xdg_shell version 5. Fixes T2357 where gtk apps
would not work. Confirmed working now.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-06-08 12:23:40 -04:00
Boram Park 5c46de06c6 e_comp_wl: fix not sending a mouse enter event to client.
Summary:
First of all, currently cdata->ptr.x,y contains e_client related pos.
But, cdata is owned by e_comp, not per e_client. So cdata->ptr.x,y should contain
absolute pos.
And, when a pointer resource is created, enter event should be sent to client.

Change-Id: I21cb031e293fe281e35ba89f3a96116a28a48856
Signed-off-by: Boram Park <boram1288.park@samsung.com>

Test Plan:
1. run e as wayland server
2. move cursor to around 50,50
3. run elementary_test
4. click the mouse left button on slide toggle widget.
   (Don't move a cursor out of elementary_test. If you do, you can't find bug)

Reviewers: gwanglim, raster, devilhorns, ManMower, zmike

Reviewed By: zmike

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2330
2015-05-18 11:53:05 -04:00
Chris Michael 646db93b53 add missing EINA_UNUSED for function paramater
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-05-18 09:20:16 -04:00
Derek Foreman 7f6f4b6966 wayland: Remove a lot of E_Comp_Data pointers
Summary: We should just use e_comp->wl_comp_data everywhere we can.

Reviewers: devilhorns, zmike

Reviewed By: zmike

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2507
2015-05-18 09:08:52 -04:00
Chris Michael 829c9ffc73 wl-desktop-shell: Quiet debug output
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-05-13 14:50:40 -04:00
Chris Michael 0a94e8ba71 enlightenment: Make E build again with EFL from git
sed -i 's/EAPI/E_API/g'

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-05-07 15:13:10 -04:00
Mike Blumenkrantz f843b48eb2 update wl shell parent setting code to use clients instead of pixmaps
ref T2354
2015-04-22 14:55:45 -04:00
Mike Blumenkrantz 96f07bff8a wl client pixmaps now use a different method for creating the pixmap id 2015-04-21 15:19:20 -04:00
Mike Blumenkrantz 617c2d96ff move wl E_Client creation to same place as E_Pixmap creation
ensure that surface manipulation functions will succeed even with no shell surface
2015-03-30 12:13:04 -04:00
Mike Blumenkrantz 2810a4802a remove E_Comp usage from wl desktop shell 2015-03-18 17:34:16 -04:00
Mike Blumenkrantz 0ddedd09a4 wl compile fixes 2015-03-13 20:09:54 -04:00
Mike Blumenkrantz 1736d1ecb9 e_client functions no longer require E_Comp param 2015-03-13 16:53:19 -04:00
Mike Blumenkrantz 091142b032 remove E_Client->comp 2015-03-13 15:41:21 -04:00
Mike Blumenkrantz d42586869e fix wl shell client borders for internal, borderful clients...again 2015-03-13 15:03:13 -04:00
Mike Blumenkrantz b688ddbeb0 don't crash when creating external shell surface clients
sadconditionals.jpg
2015-03-12 14:53:46 -04:00
Mike Blumenkrantz bb77ddf22c correctly apply wl shell client border states only for non-internal clients 2015-03-12 14:48:46 -04:00
Mike Blumenkrantz f1b47ca2af don't create new wl shell clients for internal windows 2015-03-12 14:42:00 -04:00
Mike Blumenkrantz 3f5d25a535 don't identify all wl shell clients as internal...you crackhead 2015-03-12 13:13:55 -04:00