summaryrefslogtreecommitdiff
path: root/clients/simple-egl.c
Commit message (Collapse)AuthorAgeFilesLines
* simple-egl: use roundtrip after get_registry requestMarek Chalupa2016-03-151-1/+1
| | | | | | | | | | | | | | | | | | Sometimes weston-simple-egl aborts in create_surface under some conditions. It is because wl_display_dispatch() may not be enough to make sure we have all requried objects. Can be modeled by wldbg: $ wldbg -i weston-simple-egl (wldbg) b re get_registry (wldbg) c (wldbg) c After these steps the weston-simple-egl aborts, because it has not got shell neither ivi-shell objects Signed-off-by: Marek Chalupa <mchqwerty@gmail.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* Use xdg_shell protocol from wayland-protocolsJonas Ådahl2015-11-191-1/+1
| | | | | | | Signed-off-by: Jonas Ådahl <jadahl@gmail.com> Reviewed-by: Mariusz Ceier <mceier+wayland@gmail.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Acked-by: Jasper St. Pierre <jstpierre@mecheye.net>
* Remove redundant #include path component.Jon Cruz2015-06-151-1/+1
| | | | | | | | | Using the parent '../' path component in #include statements makes the codebase more rigid and is redundant due to proper -I use. Signed-off-by: Jon A. Cruz <jonc@osg.samsung.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
* clients: Update boilerplate from MIT X11 license to MIT Expat licensesBryce Harrington2015-06-151-16/+17
|
* platform: rename create_egl_window to create_egl_surfaceJonny Lamb2015-03-261-3/+3
| | | | Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* clients & tests: use eglCreatePlatformWindowSurfaceEXT when supportedJonny Lamb2015-03-201-3/+4
| | | | | Reviewed-by: Derek Foreman <derekf@osg.samsung.com> Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
* clients & tests: use eglGetPlatformDisplayEXT when supportedJonny Lamb2015-03-201-1/+5
| | | | | Reviewed-by: Derek Foreman <derekf@osg.samsung.com> Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
* xdg-shell: Bump unstable versionJasper St. Pierre2015-02-271-1/+1
| | | | Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* Revert "simple-egl: HACK to report presentation flags"Bryce Harrington2015-01-201-49/+0
| | | | | | This reverts commit b77acf592fdc625a09e4d1ea1672dba2db128238. Change is listed as "not for upstream"
* simple-egl: HACK to report presentation flagsPekka Paalanen2015-01-201-0/+49
| | | | | | | | | | | | | | | | | | So that we can test the per-surface ZERO_COPY flag: - start Weston on DRM backend - run ./weston-simple-egl -o (need to be opaque to end up on overlay) - hit debug key 'V' to enable the (broken) hw overlays The debug key is used by first hitting Mod+Shift+space, then hitting 'v'. Enabling overlays should change the flags from 0x7 to 0xe. To verify the window is really on an overlay, use debug key 'S' to tint all GL-composited things green. This patch is not intended for upstream. Reviewed-by: Mario Kleiner <mario.kleiner.de@gmail.com> Tested-by: Mario Kleiner <mario.kleiner.de@gmail.com>
* clients: support ivi-application.xml for clients/simple-egl.cNobuhiko Tanibata2014-12-041-9/+86
| | | | | Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* simple-egl: fix opaque and 16 bits mode optionsArnaud Vrac2014-08-281-0/+1
| | | | | | In those cases we were writing to the wrong EGL config attribute. Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* xdg-shell: bump experimental protocol versionPekka Paalanen2014-08-211-1/+1
| | | | | | | | | | | | | | | | | | | | The experimental versioning has not been updated when it was supposed to. Let's try to be better at it now, as xdg-shell is close to have its first stable version. Bump the version now to bring the world into the same exact version. There may be some protocol changes still coming, but we try to land them before 1.6 gets out. Those changes will bump the experimental version again as needed. When 1.6.0 is released, the experimental version will no longer be bumped, and no incompatible protocol changes will be made. Xdg-shell.xml file will move to Wayland in 1.7.0, drop the experimental versioning, and become stable. Cc: Jasper St. Pierre <jstpierre@mecheye.net> Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* simple-egl: Clean up unused frame_listenerBoyan Ding2014-08-151-6/+0
| | | | | | | Unused since commit 1e65840b6103197a684a551925a58fb1ae6c40e3 Signed-off-by: Boyan Ding <stu_dby@126.com> Reviewed-by: Nils Chr. Brause <nilschrbrause@gmail.com>
* xdg-shell: Turn "activated" into a stateJasper St. Pierre2014-05-121-12/+0
| | | | | This drops two events, and makes new window decorations race-free with an attach in-flight.
* xdg-shell: Rework the state systemJasper St. Pierre2014-05-121-42/+41
| | | | | | The states system, so far, has been a complicated mix of weird APIs that solved a real race condition, but have been particularly ugly for both compositors and clients to implement.
* Make sure config.h is included before any system headersAndrew Wedgbury2014-04-071-0/+2
| | | | | | | | | | | | | | | There was an issue recently in screen-share.c where config.h was not being included, resulting in the wrong definition for off_t being used on 32 bit systems. I checked and I don't think this problem is happening elsewhere, but to help avoid this sort of problem in the future, I went through and made sure that config.h is included first whenever system headers are included. The config.h header should be included before any system headers, failing to do this can result in the wrong type sizes being defined on certain systems, e.g. off_t from sys/types.h Signed-off-by: Andrew Wedgbury <andrew.wedgbury@realvnc.com>
* Check return value of wl_cursor functionsHardening2014-04-011-0/+10
| | | | | | This patch adds checks for themes and cursors returned by wl_cursor functions. Reviewed-by: Bryce Harrington <b.harrington@samsung.com>
* xdg-shell: Bump unstable version to 3Kristian Høgsberg2014-02-191-1/+1
|
* xdg-shell: Replace the set_* atrocity with a new approachJasper St. Pierre2014-02-191-63/+23
| | | | | | Rather than require that the client implement two methods for every state, simply have one global request, change_state, and one global event, request_change_state.
* xdg-shell: Rename focused_set / focused_unset to activated / deactivatedJasper St. Pierre2014-02-181-4/+4
| | | | To try and make the distinction between this event and keyboard focus.
* clients: Add delete handler for simple-shm / simple-eglJasper St. Pierre2014-02-181-0/+7
| | | | It seems this was forgotten in the port.
* client: Fix shell unstable version checkKristian Høgsberg2014-02-111-1/+7
| | | | | | | | Use a static assert to catch mismatch between implementation and interface version. Fix window.c to not use XDG_SHELL_VERSION_CURRENT, which will fail to catch version mismatches. The implementation version must updated manually when the implementation is updated to use the new interface.
* xdg-shell: Move "ping" and "pong" to xdg_shell, not xdg_surfaceKristian Høgsberg2014-02-111-8/+11
| | | | | | | Responsivenes is a per-client thing so we move the ping/pong functionality to xdg_shell. Having this per-window was carries over from the EWMH protocol, where the WM has no other way to do this. In wayland, the compositor can directly ping the client that owns the surface.
* clients: Port simple-shm and simple-egl to xdg-shellKristian Høgsberg2014-02-071-31/+62
|
* simple-egl: Fix -Wsign-compare compiler warningJonas Ådahl2014-01-271-1/+1
| | | | | | | | | Fixes the following compiler warning: simple-egl.c:434:36: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
* simple-egl: Add option to allow not syncing to compositor repaint cycleKristian Høgsberg2013-12-071-19/+27
| | | | It's the GO FASTER option.
* simple-egl: Print fps for the spinning triangleKristian Høgsberg2013-12-071-5/+17
| | | | This is not a benchmark.
* simple-egl: Add support for using a 16 bpp EGLConfigKristian Høgsberg2013-10-151-8/+33
|
* simple-egl: Handle missing EGL_EXT_buffer_age betterKristian Høgsberg2013-08-261-2/+5
| | | | | Including src/weston-egl-ext.h breaks distcheck, so lets just copy the one EGL_EXT_buffer_age into simple-egl.c.
* Add touch support for wl_shell_surface_moveRusty Lynch2013-08-161-0/+50
|
* fix compile error when EGL_BUFFER_AGE_EXT is missingAdrian Negreanu2013-08-121-0/+2
| | | | Signed-off-by: Adrian Negreanu <adrian.m.negreanu@intel.com>
* simple-egl: Add support for EGL_EXT_swap_buffer_with_damageKristian Høgsberg2013-05-081-1/+39
| | | | | | | This new EGL extension lets us communicate the damage area to the compositor by using eglSwapBuffersWithDamge() instead of the regular eglSwapBuffer(). http://www.khronos.org/registry/egl/extensions/EXT/EGL_EXT_swap_buffers_with_damage.txt
* Fix simple-egl tear-down order to prevent a crash on exit timeYeh, Sinclair2013-05-011-5/+6
| | | | | | | wl_egl_window_destory() destroys the window handle that dri2_destroy_surface() later uses when eglTerminate() is called. Reordering the tear down order prevents such case from occuring.
* clients: add global_remove handler stubsPekka Paalanen2013-01-241-1/+8
| | | | | | | | | | | | | All the clients here were missing the global_remove handler. Because window.c did not have it, weston-desktop-shell and weston-keyboard segfaulted on compositor exit, as they received some wl_registry.global_remove events. Add more or less stub global_remove handlers, so that clients do not crash on such events. Toytoolkit and all applications would need a lot more code to properly handle the global object removal. Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
* simple-egl: Remove old obsolete fbo and color_rbo fieldsKristian Høgsberg2012-12-111-4/+0
| | | | Finally a commit that actually makes simple-egl simpler.
* clients: destroy wl_registry on exitPekka Paalanen2012-12-061-0/+1
| | | | | | | Plug an insignificant memory leak in demo programs that bother to clean up at all. Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
* simple-egl: Reset opaque region if not fullscreen.Scott Moreau2012-11-191-0/+2
| | | | | | | If simple-egl is toggled fullscreen, the opqaue region is set for the surface but never removed after exiting fullscreen. This patch resets the opaque region to 0 if the surface is not fullscreen and -o was not passed. This fixes the problem introduced sometime since d7f282b84e, when this was last fixed.
* simple-egl: Set the right size for the opaque region when fullscreenAnder Conselvan de Oliveira2012-11-161-2/+2
| | | | | | window.window_size holds the size of the window in windowed mode. Use window.geometry for setting the opaque region since that holds the current size.
* simple-egl: Add a default cursorKristian Høgsberg2012-10-291-0/+33
| | | | | | | | | If clients don't set a cursor, they get whatever the last cursor was before the pointer entered their window. That's a little confusing, so set a pointer on enter to avoid that. The down-side is that simple EGL isn't very simple anymore. https://bugs.freedesktop.org/show_bug.cgi?id=52452
* clients: Check return value of wl_display_dispatch()Kristian Høgsberg2012-10-161-3/+3
| | | | | | The simple clients all just call wl_display_dispatch() in a while loop without checking the return value. Now, if the server dies or other error occurs, we get a -1 return value instead and need to break the loop.
* compositor, clients: apply wl_surface.frame on commitPekka Paalanen2012-10-101-2/+2
| | | | | | | | | | | | | | | | | Apply wl_surface.frame request only on the next wl_surface.commit according to the new protocol. This makes it explicit, which repaint actually triggered the frame callback, since commit schedules a repaint. Otherwise, something causing a repaint before a commit could trigger the frame callback too early. Ensure all demo clients send commit after wl_surface.frame. Note, that GL apps rely on eglSwapBuffers() sending commit. In toytoolkit, it is assumed that window_flush() always does a commit. compositor-wayland assumes renderer->repaint_output does a commit. Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
* compositor, clients: double-buffer opaque regionPekka Paalanen2012-10-101-2/+2
| | | | | | | | | | | | | Make wl_surface.set_opaque_region double-buffered as required by the new protocol. Also, do not reset the opaque region on surface size changes anymore. Only explicit requests from the client will change the region now. In clients, make sure commit happens after setting the opaque region. Mesa does not need a fix, as it never touches the opaque region. Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
* Update to new fd and wl_registry APIsKristian Høgsberg2012-10-101-20/+17
| | | | | This commit updates the clients and the wayland compositor backend to use the new wl_registry mechanism and the thread safe fd API.
* clients: Set title for all shell surface demos.Scott Moreau2012-10-091-0/+2
|
* simple-egl: Set the opaque region if windowed and -o is passedAnder Conselvan de Oliveira2012-09-141-9/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | Since commit 6a615d262141de7cf094788203d9c044dfb9f08d [1], the opaque region would be set only when running fullscreen. Having it set properly for the windowed case is helpful to test the overlay path in compositor-drm. What this patch does is: - reverts the above commit; - remove the "if fullscreen make the window opaque" conditional, that should have been removed when -o was introduced and was actually the cause for the bug solved in [1]; - sets the opaque region when running fullscreen, regardless of the -o switch. [1] commit 6a615d262141de7cf094788203d9c044dfb9f08d Author: Scott Moreau <oreaus@gmail.com> Date: Thu Aug 30 14:44:16 2012 -0600 simple-egl: Only set alpha_size=0 when -o is passed. v2: - Clarify in the commit message that this does not regress the bug solved in [1]. - Use the correct sha1 for the reverted commit.
* simple-egl: Avoid race condition.Scott Moreau2012-08-311-1/+6
| | | | | | | | | | After explaining the problem on irc, Pekka dictated this solution which works. The problem is that simple-egl can hang when toggling fullscreen because of a race where (quoting Pekka) "if it dispatches the frame callback simple-egl itself requested before the Mesa's own frame callback came, simple-egl will go to its redraw routing and call eglSwapBuffers so you end up effectively calling eglSwapBuffers from within eglSwapBuffers, and deadlock". This patch avoids redrawing (which calls eglSwapBuffers) when there is a pending frame callback.
* simple-egl: Only set alpha_size=0 when -o is passed.Scott Moreau2012-08-311-3/+5
| | | | | | | When starting simple-egl with -f for fullscreen and toggling to 'windowed' mode with F11, the surface is opaque instead of semi-trnasparent as it is when starting without -f. We only want to create the surface with alpha_size=0 when the user explicitly passes -o because otherwise it will never have the ability to use alpha.
* simple-egl: Remove unused variable.Scott Moreau2012-08-311-4/+2
|
* simple-egl: Add help messageKristian Høgsberg2012-08-031-2/+17
|