summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* configure.ac: Require libinput 0.8Jonas Ådahl2015-01-151-1/+1
| | | | Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
* libinput-device: use the discrete axis value for wheel eventsPeter Hutterer2015-01-151-4/+40
| | | | | | | | | | | libinput < 0.8 sent wheel click events with value 10. Since 0.8 the value is the angle of the click in degrees but it now provides the click count as separate value. To keep backwards-compat with existing clients, we just send multiples of the click count. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Jonas Ådahl <jadahl@gmail.com> Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
* libinput-device: use the new merged scroll eventsPeter Hutterer2015-01-151-5/+20
| | | | | | | | libinput now provides a single event for scroll events. Extract the axes from that event and split them into the wl events. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
* input: Add comment explaining why pointer isn't freed when device is removedDerek Foreman2015-01-081-0/+5
| | | | | | | | | When the last pointer is removed from a seat, the pointer struct is intentionally kept. This has some interesting side effects, so I've documented it here so people like me don't errantly assume it's a bug. Signed-off-by: Derek Foreman <derekf@osg.samsung.com> Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
* compositor-x11: Fix some shutdown crashesDerek Foreman2014-12-191-2/+14
| | | | | | | | | | | | | The assertion in x11_compositor_find_output() can trigger during normal shutdown, for example, when moving the mouse while hitting a hotkey to close the weston window. Instead we can remove the assert(), return NULL, and discard events we can't find a destination output for. v2 Signed-off-by: Derek Foreman <derekf@osg.samsung.com> v1 Reviewed-by: Bryce Harrington <bryce@osg.samsung.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* configure: bump libwayland requirementsPekka Paalanen2014-12-181-2/+2
| | | | | | | | wl_surface role error codes were added during the 1.6.90 development to libwayland. Reported-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk> Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* ivi-shell: Fix wrong condition to check return value of controller_module_initNobuhiko Tanibata2014-12-161-2/+2
| | | | Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
* text: Don't crash if a seat has no keyboardDerek Foreman2014-12-161-6/+10
| | | | | | | | | | A keyboard might not be present in a seat, so check that before dereferencing keyboard related pointers. Also, use the keyboard pointer we set to shorten the code a little bit. Signed-off-by: Derek Foreman <derekf@osg.samsung.com> Reviewed-by: Jan Arne Petersen <janarne@gmail.com>
* input: swallow the key press event when running a compositor key bindingGiulio Camuffo2014-12-151-1/+4
| | | | Reviewed-by: Daniel Stone <daniel.stone@collabora.com>
* text: Use bool for input_panel_visibleDerek Foreman2014-12-151-3/+4
| | | | Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
* text: Remove unused linked list from input_method_contextDerek Foreman2014-12-151-2/+0
| | | | Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
* text: Fix coding styleDerek Foreman2014-12-151-4/+7
| | | | | | Put the return type on a separate line in function declarations. Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
* text: Fix some typosDerek Foreman2014-12-151-2/+2
| | | | Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
* ivi-shell: rewrite controller APINobuhiko Tanibata2014-12-156-825/+951
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes the breakage caused by "ivi-shell: make ivi-layout.c as a part of ivi-shell.so" hmi-controller.c: A reference implementation of controller module does not use the layout functions directly. This get function pointers at controller_module_init which called by ivi-shell. ivi-layout-export.h: Definition of interfaces in a struction: ivi_controller_interface. function pointers are set at ivi-layout.c. ivi-layout-private.h: Definition of some interfaces are remove bucause it is implemented in ivi-layout.c and set it as function pointer. Several interfaces are kept here because they are implemented in ivi-layout.c/transition.c but used in other files. ivi-layout-transition.c: remove WL_EXPORT because export is not needed anymore. remove unnesesary unsed method. ivi-shell.c: call controller_module_init of hmi-controller to init it and set function pointers. If the interface_version is equal or greater than what hmi_controller was built with, things are pass. If the interface_version is smaller than what the controller expects, it has to fail because it cannot work. This is followed the manner, - never remove a function pointer - never modify an existing function signature - additions are allowed at the end of struct ivi_controller_interface - all function pointers must always be populated and working in ivi-shell.so (ivi-layout.c etc.) Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp> Acked-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* ivi-shell: make ivi-layout.c as a part of ivi-shell.soNobuhiko Tanibata2014-12-155-99/+45
| | | | | | | | | | | | | | ivi-layout.so is separately built and loaded by using dlopen with RTLD_GLOBAL. This was because these apis defined in ivi-layout.so shall be used by ivi-modules; e.g. hmi-controller. This shall be improved that a struct ivi_layout_api contains the whole exported API as function pointers to be exposed as module_init. This patch alone builds, but loading controller modules at runtime failes. This failure will be fixed by following patches. Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* ivi-shell: several ivi-layout interfaces moved accross source.Nobuhiko Tanibata2014-12-152-66/+67
| | | | | | | Interfaces for properties setting shall be implemented in ivi-layout. Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp> Acked-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* ivi-shell: reordering method in ivi_layout.cNobuhiko Tanibata2014-12-151-85/+86
| | | | | | | | In the future, re-alignmenet of WL_EXPORT per method should be done. For that work, re-ordering is required to be used by another method. Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp> Acked-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* ivi-shell: clean up unnecesary headerNobuhiko Tanibata2014-12-152-10/+0
| | | | | Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* ivi-shell: clean-up transition animation code.Nobuhiko Tanibata2014-12-152-199/+0
| | | | | | | | ivi_layout_transition_layer_render_order is not necesary called. Remove the method and methods called by it. Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* ivi-shell: Say something when configuration is missingOndřej Majerech2014-12-151-3/+3
| | | | | | | | | | When ivi-module is not set in weston.conf, we probably want to tell the user about their error instead of just dying. Signed-off-by: Ondřej Majerech <majerech.o@gmail.com> [Pekka: include Tanibata's suggestion, fix file name, fix surrounding coding style] Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* compositor: Propagate errors from module_initOndřej Majerech2014-12-151-2/+4
| | | | | | | | | | | load_modules currently ignores errors signalled by both weston_load_module and module_init, and instead always returns 0. Its return value appears to be checked in callers, so we most likely want to propagate any errors. Signed-off-by: Ondřej Majerech <majerech.o@gmail.com> Reviewed-by: Derek Foreman <derekf@osg.samsung.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* clipboard: set fd member of clipboard_sourceMarek Chalupa2014-12-121-0/+1
| | | | | | | | | | The fd member of clipboard_source structure was not set but was used in close(). v2. don't do unnecessary changes Signed-off-by: Marek Chalupa <mchqwerty@gmail.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* screenshooter: fix various memory handlingMarek Chalupa2014-12-121-8/+17
| | | | | | | | | | | There were unchecked malloc and no free for this memory. Also simplify error handling in one function. v2. remove check if memory is NULL, according to man pages, free(NULL) is a no-op Signed-off-by: Marek Chalupa <mchqwerty@gmail.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* window: use roundtrip instead of dispatch after get_registryMarek Chalupa2014-12-121-1/+1
| | | | | | | | | | | | wl_display_dispatch() just dispatches events that are in default and display queues and if there are no events, then it will wait for them. But only dispatching the events doesn't guarantee that we got all the global announcements, we need to do sync too. Therefore use wl_display_roundtrip() instead of wl_display_dispatch(). Signed-off-by: Marek Chalupa <mchqwerty@gmail.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* xwm: fix a crash in handle_stateAndrew Engelbrecht2014-12-111-1/+3
| | | | | | | | | | | | | To produce the bug, build and run: (you don't need the game data to test) https://github.com/clintbellanger/flare-engine/ $ mv ~/.config/flare ~/.config/flare.bak $ ./flare # click 'configure', set full screen mode then click 'ok' # weston will crash and dump core. [Pekka: edited the commit message] Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* tests: Fix minor typoBryce Harrington2014-12-101-1/+1
|
* compositor: Implement JSON-timeline loggingPekka Paalanen2014-12-087-9/+476
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Logging is activated and deactivated with the debug key binding 't'. When activated, it creates a new log file, where it records the events. The log file contains events and detailed object information entries in JSON format, and is meant to be parsed in sequence from beginning to the end. The emitted events are mostly related to the output repaint cycle, like when repaint begins, is submitted to GPU, and when it completes on a vblank. This is recorded per-output. Also some per-surface events are recorded, including when surface damage is flushed. To reduce the log size, events refer to objects like outputs and surfaces by id numbers. Detailed object information is emitted only as needed: on the first object occurrence, and afterwards only if weston_timeline_object::force_refresh asks for it. The detailed information for surfaces includes the string returned by weston_surface::get_label. Therefore it is important to set weston_timeline_object::force_refresh = 1 whenever the string would change, so that the new details get recorded. A rudimentary parser and SVG generator can be found at: https://github.com/ppaalanen/wesgr The timeline logs can answer questions including: - How does the compositor repaint cycle work timing-wise? - When was the vblank deadline missed? - What is the latency from surface commit to showing the new content on screen? - How long does it take to process the scenegraph? v2: weston_surface::get_description renamed to get_label. v3: reafctor a bit into fprint_quoted_string(). Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* compositor: add weston_surface_set_label_func()Pekka Paalanen2014-12-086-0/+153
| | | | | | | | | | | | | | | | | | | | When printing out logs from Weston's actions, mainly for debugging, it can be very difficult to identify the different surfaces. Inspecting the configure function pointer is not useful, as the configure functions may live in modules. Add vfunc get_label to weston_surface, which will produce a short, human-readable description of the surface, which allows identifying it better, rather than just looking at the surface size, for instance. Set the label function from most parts of Weston, to identify cursors and drag icons, and panels, backgrounds, screensavers and lock surfaces, and the desktop shell's application surfaces. v2: renamed 'description' to 'label', so we get weston_surface_set_label_func(). Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* ivi-shell: reference implementation of input panel for ivi-shellNobuhiko Tanibata2014-12-045-1/+454
| | | | | | | | | - introduces ivi-shell/input-panel-ivi.c which is basically copied from desktop shell. It shall be improvaded to remove duplicate implementation. Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp> Acked-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* clients: support ivi-application.xml for clients/window.cNobuhiko Tanibata2014-12-041-10/+57
| | | | | Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* clients: support ivi-application.xml for clients/simple-egl.cNobuhiko Tanibata2014-12-042-10/+89
| | | | | Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* clients: support ivi-application.xml for clients/simple-shm.cNobuhiko Tanibata2014-12-042-1/+45
| | | | | Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* ivi-shell: a reference of weston.ini for ivi-shell and ivi-hmi-controller.Nobuhiko Tanibata2014-12-043-3/+104
| | | | | | | - introduces ivi-shell/weston.ini.in Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* data: add reference image files for weston-ivi-shell-user-interfaceNobuhiko Tanibata2014-12-0414-2/+40
| | | | | | | - introduces reference images used by weston-ivi-shell-user-interface. Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* clients: a reference implementation of UI client how to use ivi-hmi-controller.Nobuhiko Tanibata2014-12-043-2/+1332
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - introduces ivi-shell-user-interface.c This is launched from hmi-controller by launch_hmi_client_process and invoke a client process. The basic flow is as followed, 1/ process invoked 2/ read configuration from weston.ini. 3/ draw png file to surface according to configuration of weston.ini 4/ all parts of UI are ready. request "UI_ready" to draw UI. 5/ Enter event loop 6/ If a surface receives touch/pointer event, followings are invoked according to type of event and surface 6-1/ If a surface to launch ivi_application receive touch up, it execs ivi-application configured in weston.ini. 6-2/ If a surface to switch layout mode receive touch up, it sends a request, ivi_hmi_controller_switch_mode, to hmi-controller. 6-3/ If a surface to show workspace having launchers, it sends a request, ivi_hmi_controller_home, to hmi-controller. 6-4/ If touch down events happens in workspace, ivi_hmi_controller_workspace_control is sent to slide workspace. When control finished, event: ivi_hmi_controller_workspace_end_control is received. Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp> Acked-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* ivi-shell: a reference implementation how to use ivi-layout internal APIsNobuhiko Tanibata2014-12-042-1/+1733
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - hmi-controller.so - introduces hmi-controller.so The library is used to manage layout of surfaces/layers. Layout change is triggered by ivi-hmi-controller protocol, ivi-hmi-controller.xml. A reference how to use the protocol, see ivi-shell-user-interface.c. In-Vehicle Infotainment system usually manages properties of surfaces/layers by only a central component which decide where surfaces/layers shall be. This is differenct use case from desktop style; each application can request property of its window via xdg-shell protocol, like fullscreen and set its to top level. In-Vehicle Infortainment system doesn't allow each application to chagen them from its application because of safty reasons. The concept of layer is simillar with a use case of cursor layer of Destop. For In-Vehicle Infortainment system, it is extended to all applications. For example, rearview camera application is assigned to a layer to group several surfaces, e.g. captured image and drawing lines separately. Central manaegr can control property of the layer of rearview camera. This reference show examples to implement the central component as a module of weston. Default Scene graph of UI is defined in hmi_controller_create. It consists of - In the bottom, a base layer to group surfaces of background, panel, and buttons - Next, a application layer to show application surfaces. - Workspace background layer to show a surface of background image. - Workspace layer to show launcher to launch application with icons. Paths to binary and icon are defined in weston.ini. The width of this layer is longer than the size of screen because a workspace has several pages and is controlled by motion of input. Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp> Acked-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* protocol: ivi hmi controller protocol to set up IVI style UINobuhiko Tanibata2014-12-042-1/+99
| | | | | | | | | | | | | | | - introduces ivi-hmi-controller.xml This protocol realizes following features, - UI ready - changing modes; tiling, side by side, full_screen, and random - Give control a surface; workspace to be controlled by using ivi layout APIs - Display/undisplay a surface; home contains sevaral workspaces to launch applications Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp> Acked-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* ivi-shell: add the shell plugin for In-Vehicle Infotainment systemNobuhiko Tanibata2014-12-043-1/+520
| | | | | | | | | | | | | | | | - ivi-shell.so - introduces ivi-shell/ivi-shell.[ch] In-Vehicle Infotainment system traditionally manages surfaces with global identification. A protocol, ivi_application, supports such a feature by implementing a request, ivi_application::surface_creation defined in ivi_application.xml. The ivi-shell explicitly loads ivi-layout.so and a module to add business logic like how to layout surfaces by using ivi-layout APIs. Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* ivi-shell: add IVI layout APIsNobuhiko Tanibata2014-12-046-0/+4920
| | | | | | | | | | | | | | | | | | | | | | | | - ivi-layout.so - introduces ivi-layout-export.h, ivi-layout.[ch] API set of controlling properties of surface and layer which groups surfaces. An unique ID whose type is integer is required to create surface and layer. With the unique ID, surface and layer are identified to control them. The API set consists of APIs to control properties of surface and layers about followings, - visibility. - opacity. - clipping (x,y,width,height). - position and size of it to be displayed. - orientation per 90 degree. - add or remove surfaces to a layer. - order of surfaces/layers in layer/screen to be displayed. - commit to apply property changes. - notifications of property change. Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp> Acked-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* protocol: add interface ivi_application extensionNobuhiko Tanibata2014-12-042-2/+104
| | | | | | | | | | | | | | | | | | | - introduces ivi-application.xml Many applications in an IVI-system are special single-purpose applications that have a very specific role in the whole IVI UI, for example a rear camera, speedometer, map, etc. The IVI system vendor specifies what these are and how they integrate into the UI. They also vary between particular IVI systems. This is why we use (system-)global, unique, pre-determined ID numbers to tell what wl_surface is which application, instead of writing specific shell requests for each one. Using ID numbers allows vendors to easily invent new component applications without extending or breaking the actual Wayland protocol. In IVI-systems, the ID is a standard concept already used in several APIs, with a vendor-specified global definition of ID assignments. Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* ivi-shell: add README for ivi-shellNobuhiko Tanibata2014-12-041-0/+79
| | | | | Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* fbdev: Remove unnecessary semicolonnerdopolis2014-12-031-1/+1
| | | | [daniels: removed extraneous changes]
* input: send focus events to the focused client when running a key bindingGiulio Camuffo2014-12-012-5/+21
| | | | | | | | When running a key binding we don't send the key press to the client via the wl_keyboard.key event. Instead, send a wl_keyboard.leave/enter pair so that the client knows the actual state of the keyboard. Reviewed-by: Daniel Stone <daniel@fooishbar.org>
* rpi-renderer: don't pass a box to pixman_region32_contains_point()Derek Foreman2014-12-011-2/+1
| | | | | | | We don't care which box contained the point, so don't pass one in. Signed-off-by: Derek Foreman <derekf@osg.samsung.com> Reviewed-by: Bryce Harrington <b.harrington@samsung.com>
* Use zalloc instead of calloc(1, ...)Bryce Harrington2014-11-2811-46/+53
| | | | | Signed-off-by: Bryce Harrington <bryce@osg.samsung.com> Reviewed-by: Marek Chalupa <mchqwerty@gmail.com>
* Setting members to 0/NULL after a zalloc or calloc is redundantBryce Harrington2014-11-284-19/+0
| | | | | | | | | | calloc (and zalloc) set the allocated memory to 0, so there's really no need to do it manually. Signed-off-by: Bryce Harrington <bryce@osg.samsung.com> Reviewed-by: Marek Chalupa <mchqwerty@gmail.com> [Pekka: dropped the src/evdev.c hunk.] Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* Use zalloc rather than malloc and manually setting members to 0Bryce Harrington2014-11-282-9/+5
| | | | | Signed-off-by: Bryce Harrington <bryce@osg.samsung.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
* clients: Use xmalloc in a few more placesDerek Foreman2014-11-282-3/+3
| | | | | | | | Just changes some places where a malloc failure is unhandled to our xmalloc function that exit()s a little more gracefully. Signed-off-by: Derek Foreman <derekf@osg.samsung.com> Reviewed-by: Bryce Harrington <b.harrington@samsung.com>
* tests: Use one shared xzalloc implementationBryce Harrington2014-11-283-22/+11
| | | | | | | Since this is an inlined function, move it to a common header file. Signed-off-by: Bryce Harrington <bryce@osg.samsung.com> Reviewed-by: Marek Chalupa <mchqwerty@gmail.com>
* tests: Move ARRAY_LENGTH to a shared header for reuseBryce Harrington2014-11-282-3/+3
| | | | | Signed-off-by: Bryce Harrington <bryce@osg.samsung.com> Reviewed-by: Marek Chalupa <mchqwerty@gmail.com>