Commit Graph

21033 Commits

Author SHA1 Message Date
Derek Foreman f56bbf6e1a Fix internal window borders on 32-bit computers
Our wayland window ids are 64 bit integers, we need to be careful
about the data type on 32-bit machines where pointers are smaller
than this.
2016-04-26 09:42:51 -04:00
Mike Blumenkrantz 67153a06a2 make wayland client keyboard focus list pruning more robust
this should handle all possible cases where focused keyboard resources
need to be removed from the global list
2016-04-26 09:42:51 -04:00
Mike Blumenkrantz e2cdc28ec0 reject attempts to focus deleted comp objects 2016-04-26 09:42:51 -04:00
Mike Blumenkrantz 5d64676bd0 run focus-out and mouse-out wayland client callbacks for deleted clients
this fixes a number of issues caused by clients not cleaning up on deletion

ref 3e9029ea08

 #YouAlwaysRememberTheFirstTimeYouBorkedTheCompositor
2016-04-26 09:42:51 -04:00
Derek Foreman ba88768344 Fix wayland hide for internal windows
We need to make sure we drop reference on all exit paths through the
hide callback - somehow this only seemed to break internal windows.

ref 65166c5a36
2016-04-26 09:42:51 -04:00
Mike Blumenkrantz ec9776e5eb check returned pixmap size before attempting to create updates tiler
CID 1349419
2016-04-26 09:42:51 -04:00
Mike Blumenkrantz 40ebd1d16e don't add render update during ignored damage on deleted clients
ref 1507f815a5
2016-04-26 09:42:51 -04:00
Mike Blumenkrantz e5d9dbd4ec remove show callback from evry win on deletion
==22088== Invalid read of size 1
==22088==    at 0x2C9FE7B1: _evry_cb_show (evry.c:3046)
==22088==    by 0x5BE9918: _eo_evas_object_cb (evas_callbacks.c:65)
==22088==    by 0x69A16F4: _eo_base_event_callback_call (eo_base_class.c:715)
==22088==    by 0x69A3041: eo_event_callback_call (in /usr/lib/libeo.so.1.17.99)
==22088==    by 0x5BEA0B3: evas_object_event_callback_call (evas_callbacks.c:240)
==22088==    by 0x5C2577C: evas_object_inform_call_show (evas_object_inform.c:12)
==22088==    by 0x5C1ED24: _show (evas_object_main.c:1360)
==22088==    by 0x5C1EADA: _evas_object_efl_gfx_base_visible_set (evas_object_main.c:1313)
==22088==    by 0x575D80A: efl_gfx_visible_set (in /usr/lib/libefl.so.1.17.99)
==22088==    by 0x5C1EA58: evas_object_show (evas_object_main.c:1291)
==22088==    by 0x479FCF: _e_comp_intercept_show_helper (e_comp_object.c:1616)
==22088==    by 0x47A02A: _e_comp_intercept_show (e_comp_object.c:1630)
==22088==  Address 0x17621591 is 81 bytes inside a block of size 120 free'd
==22088==    at 0x4C2AE6B: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==22088==    by 0x2C9F95A8: _evry_window_free (evry.c:993)
==22088==    by 0x2C9F8065: evry_hide (evry.c:366)
==22088==    by 0x2C9FB9A2: _evry_cb_key_down (evry.c:1926)
==22088==    by 0x8F6ED4A: _ecore_call_handler_cb (ecore_private.h:316)
==22088==    by 0x8F6FC92: _ecore_event_call (ecore_events.c:518)
==22088==    by 0x8F7A15A: _ecore_main_loop_iterate_internal (ecore_main.c:2339)
==22088==    by 0x8F784A8: ecore_main_loop_begin (ecore_main.c:1284)
==22088==    by 0x4403F6: main (e_main.c:1087)
==22088==  Block was alloc'd at
==22088==    at 0x4C2BBD5: calloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==22088==    by 0x2C9F8D7D: _evry_window_new (evry.c:758)
==22088==    by 0x2C9F772D: evry_show (evry.c:177)
==22088==    by 0x2C9F711C: _e_mod_run_defer_cb (e_mod_main.c:537)
==22088==    by 0x8F75267: _ecore_call_task_cb (ecore_private.h:282)
==22088==    by 0x8F7574E: _ecore_idle_enterer_call (ecore_idle_enterer.c:174)
==22088==    by 0x8F7A05B: _ecore_main_loop_iterate_internal (ecore_main.c:2261)
==22088==    by 0x8F784A8: ecore_main_loop_begin (ecore_main.c:1284)
==22088==    by 0x4403F6: main (e_main.c:1087)
2016-04-26 09:42:51 -04:00
Mike Blumenkrantz af46fe8190 unify client e_hints window size setting in move/resize callbacks 2016-04-26 09:38:08 -04:00
Mike Blumenkrantz 65485742b5 20.6 NEWS updates 2016-03-09 12:18:58 -05:00
Mike Blumenkrantz c50aa176e8 20.6 release 2016-03-09 12:18:12 -05:00
Chris Michael 32921f57f3 don't have to hook the ecore_evas resize callback here as that should
be handled by elm now

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-03-09 12:15:15 -05:00
Mike Blumenkrantz 4a408dfdbc always run client res changes in e_comp_canvas_update()
this function is only called when screen geometry (or useful geometry) has
changed, and so all clients should have their geometries checked at this point
to ensure that they update for any new zone obstacle changes which have occurred
2016-03-09 12:14:59 -05:00
Mike Blumenkrantz 53941a7dc0 block re-unsetting of native surface for comp objects
due to recent evas internals changes, this breaks software compositing
2016-03-09 12:14:53 -05:00
Derek Foreman 0959e59413 Remove argb_convert for wayland buffers
Wayland buffers are currently either ARGB or XRGB - we don't need to
convert either of these, we just need to set alpha appropriately - which
we now do.
2016-03-09 12:14:47 -05:00
Derek Foreman 6f7ed23bc9 Don't use e_pixmap_image_data_argb_convert for wayland images
All we really need for wayland is to set alpha properly, so we can
save the conversion/copy when doing XRGB.
2016-03-09 12:14:41 -05:00
Derek Foreman 388ec769c0 Stop copying all wayland buffers
The new buffer management shouldn't require this anymore.
2016-03-09 12:14:37 -05:00
Derek Foreman 20303989de Re-enable window close animations for wayland
These should work properly with the new buffer management code.
2016-03-09 12:14:34 -05:00
Derek Foreman ee43c83c7d Remove wayland buffer reference
This code is similar to code in weston, but doesn't really work properly
for us in E, since this can blow up buffers behind the async renderer's
back.

The rest of the reference code has been pushed into e_pixmap, so we can
kill this all now.
2016-03-09 12:14:29 -05:00
Derek Foreman 7aef5e74fd Rework wayland buffer handling
We need to keep wayland buffers around even if they'll never be written
to again.  This is part of Buffer_Reference's task in weston, but we
already have our pixmap abstraction which can serve mostly the same
purpose.

Remove the "buffer reference" stuff from e_pixmap and replace it with a
kept buffer for the last commit.

Add shared memory pool references to keep pools from going away on us.
2016-03-09 12:14:23 -05:00
Derek Foreman 71433691da Track whether a render is in progress or not
We'll need this to protect certain wayland operations.
2016-03-09 12:14:17 -05:00
Derek Foreman d44d334953 Don't allow deleted wayland clients to set the cursor 2016-03-09 12:14:13 -05:00
Derek Foreman 74ce8dd7be Take an extra reference on wayland clients
We need to make sure wayland clients aren't deleted while the scene
graph has their data pointers, so we take an extra reference when creating
them.

We drop that reference by clearing the client's image data and putting it
in the render post_updates list.
2016-03-09 12:14:08 -05:00
Derek Foreman d38cc38b9d Track whether objects are on the post_updates list or not
Will use this to prevent accidentally adding objects to the list twice
2016-03-09 12:14:03 -05:00
Derek Foreman 4ba7648c41 Render deleted objects as long as they still have a pixmap
In wayland we can be presented with a new frame before being deleted.  If
we've never displayed that frame we should (since we released all pointers
to the old frame when we got the new one)
2016-03-09 12:14:00 -05:00
Derek Foreman 4e1d7e3854 Add a NULL check in native_surface_init under wayland 2016-03-09 12:13:55 -05:00
Carsten Haitzler bc5d9ecb03 e xkbswitch: don't free layouts that are just pointed to in instances
we free the instance layout even though tthis is never duplicated but
jhust set to point to the current_layout. don't free it as this causes
a double-free. this fixes a crash here.

@fix
2016-03-09 12:13:49 -05:00
Mike Blumenkrantz 5979808c80 apply x11 focus/unfocus using jobs
if multiple x11 clients receive focus during the same mainloop iteration,
an almost unbreakable cycle of window focus chaining will occur, resulting in
both windows being focused simultaneously--or so it appears--which results in
no window being able to receive input. to avoid this, ensure that only one x11
client can receive focus in a given loop iteration
2016-03-09 12:13:43 -05:00
Mike Blumenkrantz 85b2433559 apply x11 mouse in event for clients using a job
due to event bursts, it's possible for multiple x11 clients to receive
mouse in events on during the same main loop iteration. in this scenario,
only the last client has received an actionable mouse in, and applying this
event after the dispatch has completed ensures that multiple clients do not
all receive mouse in+out events during the same loop

this greatly improves mouse-based focus reliability in a number of cases
2016-03-09 12:13:38 -05:00
Mike Blumenkrantz ad873f03ab only use x11 mouse out event if client has received mouse in previously 2016-03-09 12:13:32 -05:00
Mike Blumenkrantz 5580a040ab reverse ordering for x11 client mouse in NotifyVirtual and NotifyInferior details
apparently I did this backwards.

ref 7b7dbbc249
2016-03-09 12:13:28 -05:00
Mike Blumenkrantz a346c622b6 reject x11 client mouse-in events on comp object based on frame geometry
mousing over a window for an x11 client should always yield x11 mouse events
in cases where mouse eventing is required; any events occurring on the comp
object in other cases inside the xwindow region are able to be ignored
2016-03-09 12:13:23 -05:00
Mike Blumenkrantz d83621f7e4 Revert "send mouse out+in on desk flip end"
This reverts commit 782cf3606e.

should be resolved in a better way with upcoming commits
2016-03-09 12:13:18 -05:00
Mike Blumenkrantz 440d9ceb81 don't directly use image data when creating a comp object mirror
in the case where pixmap image data does not yet exist, the returned
pointer will be garbage data from the internal buffer
2016-03-09 12:12:53 -05:00
Chris Michael c97b52b02c add prototype functions for missing wl_data_source interface
As we require wayland 1.10 now, there were missing functions for the
wl_data_source interface. This patch just adds placeholders for those
missing functions until we can implement them

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-03-09 12:12:45 -05:00
Chris Michael b7f1fa0b53 add prototype function for missing wl_seat interface
As we require wayland 1.10 now, the wl_seat_interface implementation
was missing a function pointer for the 'release' request. This patch
just implements a function placeholder until we can implement it.

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-03-09 12:12:31 -05:00
Chris Michael b113fd96fb add prototype functions for missing wl_data_offer interface
As we require wayland 1.10 now, there were missing functions for
wl_data_offer interface. This patch just adds placeholders for those
missing functions until we can implement them

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-03-09 12:12:26 -05:00
Mike Blumenkrantz 0b8cf7f959 do not add render updates during damage of deleted clients 2016-03-09 12:12:14 -05:00
Mike Blumenkrantz 1c0e13c575 remove impossible null check in color dialog
CID 1294267
2016-03-09 12:12:11 -05:00
Mike Blumenkrantz 2e819fef17 simplify ipc socket creation
in trying to be extra secure here, a security hole is created due to time
between mkdir and stat calls

CID 1039781
2016-03-09 12:12:05 -05:00
Mike Blumenkrantz 4619114ea7 remove ipc command allowing arbitrary command execution by the compositor
http://i2.kym-cdn.com/photos/images/facebook/000/565/399/9c0.jpg

CID 1291836
2016-03-09 12:12:00 -05:00
Mike Blumenkrantz caf795834e simplify static grab case statements
CID 1267213
2016-03-09 12:11:55 -05:00
Mike Blumenkrantz 42ff50a584 use uint instead of int for eina_list_count() return in cpufreq (trivial)
CID 1267212
2016-03-09 12:11:50 -05:00
Mike Blumenkrantz 791953e1b7 remove useless client_add handler in e_ipc
CID 1267210
2016-03-09 12:11:45 -05:00
Mike Blumenkrantz 169727db4d remove unused value in config profile saving
CID 1261287
2016-03-09 12:11:41 -05:00
Mike Blumenkrantz dddf8c5f1e prevent potential null deref during pager (plain) window drag
CID 1237302
2016-03-09 12:11:38 -05:00
Mike Blumenkrantz c24de2a210 replace static buffer usage with binbuf in e_fm_ipc
CID 1039804
2016-03-09 12:11:34 -05:00
Mike Blumenkrantz bd6b99bd30 use dblequal for double comparisons in edgebindings config 2016-03-09 12:11:27 -05:00
Mike Blumenkrantz 55fc7f4961 use strbuf instead of strcat in edgebinding string synthesis
CID 1039800
2016-03-09 12:11:23 -05:00
Mike Blumenkrantz 02c0612faf use strbuf instead of strcat in keybinding string synthesis
CIDs 1039798, 1039799
2016-03-09 12:11:19 -05:00