Re: [PATCH] weston: Filter keys by id bit

2013-06-14 Thread Martin Minarik
> > The actual sequence: > > > > [2134420.1337] -> wl_keyboard at 39.key(2316, 899782584, 30, 1) > > [2134421.1337] -> wl_keyboard at 39.key(2316, 899782584, 30, 1) > > [2134422.1337] -> wl_keyboard at 39.key(2316, 899782584, 30, 0) > > [2134423.1337] -> wl_keyboard at 39.key(2316, 899782584, 3

[PATCH] weston: Filter keys by id bit

2013-06-13 Thread Martin Minarik
Since evdev keys are unreliable, they might randomly get dropped, such as, on SYN_DROPPED. Even SYN_DROPPED is sometimes not delivered. Clients, compositor are not able to recover from duplicate press/release. Multiple wl_keyboard attached devices are not distinguished properly. This fixes this bug

[PATCH] Wayland: Add how wl_keyboard represents more keyboards

2013-06-11 Thread Martin Minarik
This has been discussed. If the user wants to be able to track multiple keyboards, they need multiple seats. The enter keys attribute means it's pressed on one or multiple seat-attached keyboards. The keys never contains duplicate keys. --- protocol/wayland.xml | 14 +- 1 file chan

[PATCH 2/2] weston input: Add the key states counters

2013-06-11 Thread Martin Minarik
This fixes the compositor, so that it delivers the correct events, when attached multiple keyboards to the same seat. This is tested under the evdev backend, perhaps it works under multiseat X. The way to verify this: 1. press A on keyboard 1 2. press A on keyboard 2 3. release A on keyboard 1 4.

[PATCH 1/2] Handle SYN_DROPPED, filter keys with a bitmap

2013-06-11 Thread Martin Minarik
Since evdev keys are unreliable, they might randomly get dropped, such as, on SYN_DROPPED. Even SYN_DROPPED is sometimes not delivered. Clients, compositor are not able to recover from duplicate press/release. This fixes this bug, thereby making the compositor and clients useable even under critica

[PATCH] wayland: Add wl_keyboard:keys_update()

2013-06-10 Thread Martin Minarik
This is going to be used by compositor for the following use cases: * Hot plugging/unplugging an input device with already held keys. * Handling an input lag gracefully. However, for backward compatibility, the wl_keyboard.enter() still uses the keys array, not using this method in that case. Th

[PATCH] Wayland: Add wl_pointer.buttons_update()

2013-06-10 Thread Martin Minarik
Extend the wl_pointer protocol, to enable: * Hot plugging/unplugging an input device with already held keys. * Handling an input lag gracefully. * Provide a way to deliver the state of all buttons when focusing a surface. --- protocol/wayland.xml | 34 +- 1 file c

[PATCH] wfits: run without superuser

2013-05-31 Thread Martin Minarik
This patch makes it possible to run wayland-fits without root. This approach also stresses the evdev.c stack. (calling the notify_* api approach would bypass the evdev.c stack) Testing also the evdev.c can help code test coverage. Probably can catch more bugs this way. How it works. Basically, w

[PATCH] Weston: SDK: export evdev.h

2013-05-31 Thread Martin Minarik
This allows plugins to emulate a weston evdev device To run wl-fits without superuser, apply this patch. --- src/Makefile.am |9 ++--- src/evdev.c |4 ++-- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/Makefile.am b/src/Makefile.am index 106ccba..6146aff 10064

Gamepad focus model (Re: Input and games.)

2013-05-08 Thread Martin Minarik
I like the second-class seat proposal. got the roughly same idea called it a focus inherit seat. It's kind of a child seat that is, for some reason, not capable to change it's own focus, instead it follows the mother seat focus. Nice thing is, the seat id = player id, making the player id redun

Re: Input and games.

2013-04-21 Thread Martin Minarik
Hello Todd > That's a complete controller state in 32 bytes. The analog values > in actual hardware are usually actually returned as unsigned byte > values, but from a protocol point of view converting each stick axis > to the range [-1.0f .. 1.0f] and the triggers to [0.0f .. 1.0f] is > saner.

Seats support

2013-04-17 Thread Martin Minarik
Hello. Multi seat support is welcome. There is already some code in place. Ability to define anything in weston.ini file is probably not needed, because the information can be obtained from udev. It happens in udev-seat.c The udev should provide a ID_SEAT for every device. Currently, all the de

[PATCH] evdev: Handle SYN_DROPPED, keep transaction buffer

2013-04-05 Thread Martin Minarik
Each evdev device keeps a key press bitmap, the incoming events are filtered to the following constraints: 1. only notify releases for previously pressed keys 2. only notify presses for previously released keys 3. on device destroy, notify a releases for all pressed keys Notes: 1. For example wh

[PATCH v2 weston] evdev: Mouse speed and acceleration

2013-04-01 Thread Martin Minarik
endif diff --git a/src/evdev-mouse.c b/src/evdev-mouse.c new file mode 100644 index 000..351eadc --- /dev/null +++ b/src/evdev-mouse.c @@ -0,0 +1,467 @@ +/* + * Copyright © 2013 Martin Minarik + * Copyright © 2006-2009 Simon Thum + * + * Permission is hereby granted, free of charge, to any

[PATCH weston] evdev: Mouse speed and acceleration

2013-03-29 Thread Martin Minarik
Acceleration: After examining, I don't like the X acceleration approach. X employs a so called velocity approximation (?) algorithm. It is quite a complex way to get an approximation of a simple thing, the velocity, when we can compute the velocity directly. Configuring: Please, tune the values in

[PATCH weston] evdev: Handle SYN_DROPPED, atomically count buttons

2013-03-26 Thread Martin Minarik
When the kernel event queue overruns, the evdev.c will: 1. Skip events until and up to the next SYN_REPORT 2. Count depressed grab buttons on seat devices. 3. If the depressed grab button count is different, update it atomically. If it changed to zero, call grab cancelation. Potential pitfalls:

[PATCH weston] evdev: Handle SYN_DROPPED, query the state of buttons

2013-03-18 Thread Martin Minarik
When the kernel event queue overruns, the evdev.c will: 1. Skip events until and up to the next SYN_REPORT 2. Notify the compositor of the lag, the compositor can specify a key range of a key buttons to query the state of. The compositor will also invalidate the button event counters, if any.

[PATCH] weston evdev: Filter double press, double release

2013-03-16 Thread Martin Minarik
Track mouse button values. When the kernel drops, don't send notify again about a button, that's already pressed or released. --- src/evdev.c | 32 ++-- src/evdev.h |3 +++ 2 files changed, 33 insertions(+), 2 deletions(-) diff --git a/src/evdev.c b/src/evdev.c i

[PATCH 2/2] wayland-cursor: Introduce os-fault-handler

2013-02-01 Thread Martin Minarik
sor.c \ xcursor.h diff --git a/cursor/os-fault-handler.c b/cursor/os-fault-handler.c new file mode 100644 index 000..437f80e --- /dev/null +++ b/cursor/os-fault-handler.c @@ -0,0 +1,143 @@ +/* + * Copyright © 2013 Martin Minarik + * + * Permission to use, copy, modify, distribute, and sell this sof

[PATCH 1/2] wayland-cursor: Introduce size_t, improve error handling

2013-02-01 Thread Martin Minarik
The size_t is introduced, accomodating for the possibility of a large addres space. The error handling is improved, in particular the memory leaks are fixed. --- cursor/wayland-cursor.c | 88 +-- 1 file changed, 63 insertions(+), 25 deletions(-) diff

[PATCH] Kmscon wlterm: Fix stuck key repeat bug

2013-01-26 Thread Martin Minarik
1. Depress Shift 2. Depress K 3. Release Shift 4. Release K Observed: key stuck repeat Expected: key not stuck repeating --- src/wlt_toolkit.c |3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/wlt_toolkit.c b/src/wlt_toolkit.c index b1679fb..104def2 100644 --- a/src/wlt

[PATCH] wlt_toolkit.c: Fix resize window stuck in need_resize=true

2013-01-24 Thread Martin Minarik
The problem is that: wnd->w_frame contains a number and wnd->need_frame=true Therefore schedule_frame() doesn't schedule the callback. But deleting these checks causes flicker. Further redesign of the frame sheduling was necessary. 4. frame_callback() 3. do_frame() 3. idle_frame() 2. schedule_fr

[PATCH v3] Weston: weston.ini.man page

2013-01-18 Thread Martin Minarik
changes: - launcher path, passing environment variables and parameter - indent modeline example --- man/Makefile.am|9 +- man/weston.ini.man | 332 2 files changed, 338 insertions(+), 3 deletions(-) create mode 100644 man/weston.ini.

[PATCH v2] Weston: weston.ini.man page

2013-01-17 Thread Martin Minarik
- Update to latest automake - Spaces in INI are significant - elaborate on data types, by pq - mention type of value for each key - automake weston modules dir path - remove [shell] type= - animation= no animation otherwise. - The desktop and tablet [shell] sections are not separate in t

[PATCH] Weston: weston.ini.man page

2013-01-16 Thread Martin Minarik
Updates since last patch: - The weston.ini.5 is now generated from weston.ini.man by automake - Track changes in weston.ini format: core, input-method sections. - animation: make zoom, fade bold. - More examples for keymap layous. - Example for term=xterm-256color - Use key= instead of optio

[PATCH v3] Weston: weston.ini man page

2013-01-12 Thread Martin Minarik
Track changes in weston.ini format: core, input-method sections. animation: make zoom, fade bold. More examples for keymap layous. Example for term=xterm-256color --- man/weston.ini.5 | 268 ++ 1 file changed, 268 insertions(+) create mode 1006

[PATCH] wayland util: Handle malloc failure in wl_array_copy()

2012-10-08 Thread Martin Minarik
If the malloc in wl_array_add() fails, we are memcpy-ing to bad memory. This can happen only when copying array to smaller array. --- src/wayland-util.c | 11 --- src/wayland-util.h |2 +- tests/array-test.c |8 ++-- 3 files changed, 15 insertions(+), 6 deletions(-) diff --g

[PATCH] Weston: weston.ini man page

2012-10-08 Thread Martin Minarik
The man page is not very detailed and exceptionally accurate, but it mentions the configuration options. --- man/weston.ini.5 | 184 ++ 1 files changed, 184 insertions(+), 0 deletions(-) create mode 100644 man/weston.ini.5 diff --git a/man/wes

[PATCH] wayland util: Handle malloc failure in wl_array_copy()

2012-07-19 Thread Martin Minarik
If the malloc in wl_array_add() fails, we are memcpy-ing to bad memory. This can happen only when copying array to smaller array. --- src/wayland-util.c | 11 --- src/wayland-util.h |2 +- tests/array-test.c |8 ++-- 3 files changed, 15 insertions(+), 6 deletions(-) diff --g

[PATCH 4/4] xwayland: Fixme: Free windows in hash

2012-07-18 Thread Martin Minarik
Use custom wrapper iterator function for destroying each window in hash. --- src/xwayland/window-manager.c |9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/xwayland/window-manager.c b/src/xwayland/window-manager.c index 6e032ea..5d7e653 100644 --- a/src/xwayland/w

[PATCH 4/4] xwayland: Fixme: Free windows in hash

2012-07-03 Thread Martin Minarik
Use custom wrapper iterator function for destroying each window in hash. --- src/xwayland/window-manager.c |9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/xwayland/window-manager.c b/src/xwayland/window-manager.c index 6e032ea..5d7e653 100644 --- a/src/xwayland/w

[PATCH] weston: Clip window title text to the frame

2012-07-02 Thread Martin Minarik
Fixes an issue with text overflowing the available frame space. --- shared/cairo-util.c |4 1 file changed, 4 insertions(+) diff --git a/shared/cairo-util.c b/shared/cairo-util.c index 649ed98..6348ff7 100644 --- a/shared/cairo-util.c +++ b/shared/cairo-util.c @@ -401,6 +401,10 @@ theme_

[PATCH v3] desktop-shell: Configurable clock format, fix accuracy

2012-06-24 Thread Martin Minarik
Add weston.ini section to allow customizing the format of the displayed time. The redraw interval is based on whether the required format contains a second entries (%S %s %T). Synchronize redrawing the clock exactly with system time. Get time from gettimeofday(), instead of time(). Avoid redrawing

[PATCH] editor: Malloc check, flush stuck keyboard

2012-06-21 Thread Martin Minarik
The on screen keyboard stays displayed when the editor is closed. We need to flush the display once more. This patch adds the display_flush() method to window.c, to execute wl_display_flush() once, not in a loop like in display_run(). It also adds the NULL checks in constructor and destructor. -

[PATCH v2] desktop-shell: configurable clock

2012-06-19 Thread Martin Minarik
Add weston.ini section to allow customizing the format of the displayed time. The redraw interval is based on whether the required format contains a second entries (%S %s %T). In case no settings are found, fall back to default values. --- clients/desktop-shell.c | 52 ++

[PATCH] compositor: Verify XDG_RUNTIME_DIR variable

2012-06-19 Thread Martin Minarik
Print an user friendly error mesage when the variable is not a valid directory. --- src/compositor.c | 34 +- 1 files changed, 29 insertions(+), 5 deletions(-) diff --git a/src/compositor.c b/src/compositor.c index d40a878..f5940aa 100644 --- a/src/compositor.c +

[PATCH] Use pangocairo in theme_render_frame() title.

2012-06-19 Thread Martin Minarik
This provides support for international text in window titles. --- configure.ac|5 +++-- shared/cairo-util.c | 37 ++--- 2 files changed, 25 insertions(+), 17 deletions(-) diff --git a/configure.ac b/configure.ac index ce97486..3198d16 100644 --- a/co

Re: wayland-devel Digest, Vol 21, Issue 62

2012-06-17 Thread Martin Minarik
> Message: 1 > Date: Sat, 16 Jun 2012 19:59:00 +0200 > From: Lukasz Skrzeczacy > To: wayland-devel@lists.freedesktop.org > Subject: Is Wayland a secure display server? > Message-ID: > Content-Type: text/plain; charset="UTF-8" > > Hi, > I am not a profesional Linux and English user so keep it in m

[PATCH v2] desktop-shell: configurable clock

2012-06-15 Thread Martin Minarik
Add weston.ini section to allow customizing the format of the displayed time. The redraw interval is based on whether the required format contains a second entries (%S %s %T). In case no settings are found, fall back to default values. --- clients/desktop-shell.c | 52 ++

[PATCH] weston: Silence valgrind

2012-06-15 Thread Martin Minarik
--- src/clipboard.c |2 ++ src/compositor.c |6 +++--- src/log.c|4 ++-- src/util.c |4 ++-- 4 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/clipboard.c b/src/clipboard.c index 92c8a83..9cf391a 100644 --- a/src/clipboard.c +++ b/src/clipboard.c @@

[PATCH] wayland: Silence valgrind

2012-06-15 Thread Martin Minarik
--- src/connection.c |2 ++ src/wayland-server.c |4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/connection.c b/src/connection.c index 1272210..bf75e66 100644 --- a/src/connection.c +++ b/src/connection.c @@ -422,6 +422,8 @@ wl_closure_vmarshal(struct wl_obj

[PATCH] Update build instructions

2012-06-13 Thread Martin Minarik
The xwayland branch of xf86-video-intel DDX is more recent than the xwayland-1.12 --- xserver.html |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/xserver.html b/xserver.html index 9c40f9b..012c0c2 100644 --- a/xserver.html +++ b/xserver.html @@ -63,7 +63,7 @@ with Nv

[PATCH 2/2] desktop-shell: Make clock format configurable, weston.ini

2012-06-13 Thread Martin Minarik
This is the configuration file entry. --- weston.ini |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/weston.ini b/weston.ini index 7693253..911353a 100644 --- a/weston.ini +++ b/weston.ini @@ -27,6 +27,10 @@ path=/usr/bin/google-chrome icon=/usr/share/icons/gnome/24x24

[PATCH] desktop-shell: Make clock format configurable

2012-06-12 Thread Martin Minarik
This allows the user to specify the format of the displayed time. It is possible to set the period of redraw (in seconds). --- clients/desktop-shell.c | 49 +++--- 1 files changed, 45 insertions(+), 4 deletions(-) diff --git a/clients/desktop-shell.c b/cl

[PATCH 3/3] compositor-android.c: Add missing include log.h

2012-06-10 Thread Martin Minarik
Due to missing include, the messages from compositor-android are not processed. Thanks to collegue for reminding of this issue. --- src/compositor-android.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/src/compositor-android.c b/src/compositor-android.c index 76b0ff1..

[PATCH 2/3] Log: Remove date from timestamp, log it only once.

2012-06-10 Thread Martin Minarik
This patch may be useful, the timestamp with date seems too long. --- src/log.c | 13 - 1 files changed, 12 insertions(+), 1 deletions(-) diff --git a/src/log.c b/src/log.c index a111cf8..0452e65 100644 --- a/src/log.c +++ b/src/log.c @@ -34,6 +34,8 @@ static FILE *weston_logfile

[PATCH 1/3] compositor: Print uname information to log

2012-06-10 Thread Martin Minarik
It is useful to have relevant information about the host system. Example: [..] OS: Linux, 3.0.0-13-generic, #22-Ubuntu SMP Wed Nov 2 13:25:36 UTC 2011, i686 --- src/compositor.c | 14 ++ 1 files changed, 14 insertions(+), 0 deletions(-) diff --git a/src/compositor.c b/src/composit

[PATCH] clock: Read fd to avoid 100% cpu usage

2012-06-08 Thread Martin Minarik
In clock_func() it is necessary to read the timer fd, or it will stay readable, and the event loop will call the function again. That causes an endless loop. --- clients/desktop-shell.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/clients/desktop-shell.c b/clients/desk

[PATCH] Weston: Clock

2012-06-07 Thread Martin Minarik
A panel clock. --- clients/desktop-shell.c | 143 ++- 1 files changed, 141 insertions(+), 2 deletions(-) diff --git a/clients/desktop-shell.c b/clients/desktop-shell.c index b767839..3e014cc 100644 --- a/clients/desktop-shell.c +++ b/clients/desktop-sh

[PATCH v5 1/2] Weston: log.c, log.h

2012-06-07 Thread Martin Minarik
ent_loop(display); @@ -3240,5 +3245,7 @@ int main(int argc, char *argv[]) ec->destroy(ec); wl_display_destroy(display); + weston_log_file_close(); + return 0; } diff --git a/src/log.c b/src/log.c new file mode 100644 index 000..0c605ce --- /dev/null +++ b/src/log.c

[PATCH v4 1/2] Weston: log.c, log.h

2012-05-31 Thread Martin Minarik
wl_display_destroy(display); + weston_log_file_destroy(); + return 0; } diff --git a/src/log.c b/src/log.c new file mode 100644 index 000..3665c8f --- /dev/null +++ b/src/log.c @@ -0,0 +1,127 @@ +/* + * Copyright © 2012 Martin Minarik + * + * Permission to use, copy, m

[PATCH v3 2/3] Weston: compositor.c: introduce logging

2012-05-29 Thread Martin Minarik
--- src/compositor.c |6 ++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/src/compositor.c b/src/compositor.c index d21459b..4bfbf6a 100644 --- a/src/compositor.c +++ b/src/compositor.c @@ -48,6 +48,7 @@ #include #include "compositor.h" +#include "log.h" static str

[PATCH v3 1/3] Weston: log.c, log.h

2012-05-29 Thread Martin Minarik
file mode 100644 index 000..83267d8 --- /dev/null +++ b/src/log.c @@ -0,0 +1,97 @@ +/* + * Copyright © 2012 Martin Minarik + * + * Permission to use, copy, modify, distribute, and sell this software and + * its documentation for any purpose is hereby granted without fee, provided + * that the

[PATCH v3 2/2] Wayland: logging: replace printf by wl_log

2012-05-29 Thread Martin Minarik
--- src/wayland-server.c | 17 +++-- 1 files changed, 7 insertions(+), 10 deletions(-) diff --git a/src/wayland-server.c b/src/wayland-server.c index 9f07b88..256c553 100644 --- a/src/wayland-server.c +++ b/src/wayland-server.c @@ -437,7 +437,7 @@ wl_client_destroy(struct wl_client

[PATCH v3 1/2] Wayland: logging

2012-05-29 Thread Martin Minarik
The core libwayland libraries should not handle logging, only passing the error messages to subscribed functions. An application linked to libwayland-server or libwayland-client will be able to set own functions (one per library) to handle error messages. Change in this series: make the wl_log ret

[PATCH v2 2/2] Wayland: logging, replace printf by wl_log

2012-05-28 Thread Martin Minarik
The wl_log() takes the same parameters as regular printf --- src/wayland-server.c | 17 +++-- 1 files changed, 7 insertions(+), 10 deletions(-) diff --git a/src/wayland-server.c b/src/wayland-server.c index 9f07b88..256c553 100644 --- a/src/wayland-server.c +++ b/src/wayland-server.

[PATCH v2 1/2] Wayland: logging

2012-05-28 Thread Martin Minarik
The core libwayland libraries should not handle logging, only passing the error messages to subscribed functions. An application linked to libwayland-server or libwayland-client will be able to set own functions (one per library) to handle error messages. Changes in this version I've removed WL_PR

[PATCH] Weston: log.c, log.h: the files themselves

2012-05-26 Thread Martin Minarik
index 000..4d9d61c --- /dev/null +++ b/src/log.c @@ -0,0 +1,85 @@ +/* + * Copyright © 2012 Martin Minarik + * + * Permission to use, copy, modify, distribute, and sell this software and + * its documentation for any purpose is hereby granted without fee, provided + * that the above copyright

[PATCH 2/3] Weston: compositor.c: Logging to $HOME/weston.log, stderr

2012-05-26 Thread Martin Minarik
Signed-off-by: Martin Minarik --- src/compositor.c | 10 +- 1 files changed, 9 insertions(+), 1 deletions(-) diff --git a/src/compositor.c b/src/compositor.c index 3c1e058..6582e21 100644 --- a/src/compositor.c +++ b/src/compositor.c @@ -25,13 +25,13 @@ #define _GNU_SOURCE

[PATCH] Weston: log.c, log.h: Logging

2012-05-26 Thread Martin Minarik
Logging to file can be initiated by: weston_log_file_create() , weston_log_file_destroy() For writing log messages themselves, use wl_log() or W_PRINTF() Provides weston_log_duplicator handler for writing both to file and stderr. --- src/Makefile.am |2 ++ 1 files changed, 2 insertions(+), 0

[PATCH 2/2] Wayland replace printf by WL_PRINTF

2012-05-26 Thread Martin Minarik
Signed-off-by: Martin Minarik --- src/wayland-server.c | 17 +++-- 1 files changed, 7 insertions(+), 10 deletions(-) diff --git a/src/wayland-server.c b/src/wayland-server.c index 9f07b88..5259a18 100644 --- a/src/wayland-server.c +++ b/src/wayland-server.c @@ -437,7 +437,7

[PATCH 1/2] Wayland logging functionality

2012-05-26 Thread Martin Minarik
The core libwayland libraries should not handle logging, only passing the error messages to subscribed functions. An application linked to libwayland-server or libwayland-client will be able to set own functions (one per library) to handle error messages. Signed-off-by: Martin Minarik --- src

[PATCH] Weston logging functionality.

2012-05-23 Thread Martin Minarik
In compositor, create a fprintf stderr handler for messages from libwayland. --- src/compositor.c |9 + src/compositor.h |2 ++ 2 files changed, 11 insertions(+), 0 deletions(-) diff --git a/src/compositor.c b/src/compositor.c index 3c1e058..a8966d3 100644 --- a/src/compositor.c +

[PATCH 2/2] Wayland logging, replace printf by WL_PRINTF

2012-05-23 Thread Martin Minarik
WL_PRINTF(..) is macro to wl_log(..), takes the same parameters as regular printf() --- src/connection.c | 58 - src/event-loop.c |8 +++--- src/wayland-client.c | 20 +++- src/wayland-server.c | 26 +

[PATCH 1/2] Wayland logging functionality

2012-05-23 Thread Martin Minarik
The core libwayland libraries should not handle logging, only passing the error messages to subscribed functions. An application linked to libwayland-server or libwayland-client will be able to set own functions (one per library) to handle error messages. --- src/wayland-client.c |6 ++ s

[PATCH] Wayland logging functionality

2012-05-22 Thread Martin Minarik
The core libwayland library should not handle logging itself. Instead, it returns the error in the API for anybody to subscribe to. The logging itself happens in weston or wayland demo applications. The weston and other users of libwayland API can also create their own custom message handlers and

[PATCH] weston: Optimalize wl_fixed_to_double()

2012-05-11 Thread Martin Minarik
According to my test, using multiplication is nearly 4 times faster. Dump of assembler code for function wl_fixed_to_double_old: 0x080483b4 <+0>: push %ebp 0x080483b5 <+1>: mov%esp,%ebp 0x080483b7 <+3>: fildl 0x8(%ebp) 0x080483ba <+6>: fldl 0x80484e0 0x08048

[PATCH] window.c: frame_button: Maximize, minimize, close, icon buttons in window frame.

2012-05-10 Thread Martin Minarik
--- clients/window.c | 256 +++- data/icon_window.png | Bin 0 -> 161 bytes data/sign_close.png| Bin 0 -> 235 bytes data/sign_maximize.png | Bin 0 -> 204 bytes data/sign_minimize.png | Bin 0 -> 191 bytes 5 files changed, 253 insertion

[Re: [PATCH] Weston: window.c: Frame buttons]

2012-05-04 Thread Martin Minarik
> +static int > +framebutton_enter_handler(struct widget *widget, > + struct input *input, uint32_t time, > + int32_t x, int32_t y, void *data) > +{ I've just noticed, This should be (since commit eae5de76090e18f7a4c2f654cfd94307fc2dbdd8 ) static int framebutton_enter_han

[PATCH 5/5] Weston: fix drmModeRmFB

2012-03-31 Thread Martin Minarik
fb_id is unsigned integer, we are assigning -1 to it. Changed to 0x should be better. diff --git a/src/compositor-drm.c b/src/compositor-drm.c index 4305cd5..f43f652 100644 --- a/src/compositor-drm.c +++ b/src/compositor-drm.c @@ -1041,8 +1041,9 @@ create_output_for_connector(struct drm_comp

[PATCH 4/5] Weston: handle file errors

2012-03-31 Thread Martin Minarik
diff --git a/shared/image-loader.c b/shared/image-loader.c index 98cc431..a0881b5 100644 --- a/shared/image-loader.c +++ b/shared/image-loader.c @@ -157,7 +157,7 @@ read_func(png_structp png, png_bytep data, png_size_t size) { FILE *fp = png_get_io_ptr(png); - if (fread(data, 1, siz

[PATCH 3/5] Weston: use unsigned int, iterators

2012-03-31 Thread Martin Minarik
diff --git a/clients/dnd.c b/clients/dnd.c index 66ba2ce..a99fbec 100644 --- a/clients/dnd.c +++ b/clients/dnd.c @@ -167,7 +167,7 @@ dnd_redraw_handler(struct widget *widget, void *data) struct rectangle allocation; cairo_t *cr; cairo_surface_t *surface; - int i; +

[PATCH 2/5] Weston compositor: const order

2012-03-31 Thread Martin Minarik
diff --git a/src/compositor.c b/src/compositor.c index 3b2ebd4..65de05f 100644 --- a/src/compositor.c +++ b/src/compositor.c @@ -1273,7 +1273,7 @@ surface_set_input_region(struct wl_client *client, weston_compositor_schedule_repaint(surface->compositor); } -const static struct wl_surface_

[PATCH 1/5] Weston: Enable more warnings

2012-03-31 Thread Martin Minarik
diff --git a/configure.ac b/configure.ac index f60b208..d794f72 100644 --- a/configure.ac +++ b/configure.ac @@ -170,7 +170,7 @@ AC_ARG_ENABLE(tests, AM_CONDITIONAL(BUILD_TESTS, test x$enable_tests = xyes) if test "x$GCC" = "xyes"; then - GCC_CFLAGS="-Wall -g -Wstrict-prototypes -Wmissing-

[PATCH] Window.c delay redraws with frame callback

2012-03-23 Thread Martin Minarik
Don't ignore schedule redraw between idle_redraw() triggering and the frame callback. The frame callback now sets redraw_from_callback and forces window schedule redraw. The flags prevent getting into idle_redraw again until another frame callback. diff --git a/clients/window.c b/clients/win

[PATCH] Window.c delay redraws with frame callback

2012-03-17 Thread Martin Minarik
--- clients/window.c | 203 +++-- 1 files changed, 149 insertions(+), 54 deletions(-) diff --git a/clients/window.c b/clients/window.c index 9058e4e..06f0aaa 100644 --- a/clients/window.c +++ b/clients/window.c @@ -123,6 +117,7 @@ struct window {