Ryo Munakata
a3a5debe31
gears: fix invalid calculation of the first FPS
...
At the calculation of the first FPS, gears has initialized last
FPS time with gettimeofday().
But the callback_data passed in the callback of wl_surface_frame()
is the current time, in milliseconds, with an undefined base.
Because of this subtracting last FPS time from callback_data makes no sense.
For example, below is the result of running weston-gears on weston with
drm backend:
$ weston-gears
Warning: FPS count is limited by the wayland compositor or monitor refresh rate
1 frames in 1094460.125 seconds = 0.000 FPS
301 frames in 5.016 seconds = 60.008 FPS
301 frames in 5.016 seconds = 60.008 FPS
301 frames in 5.016 seconds = 60.008 FPS
As you can see, the the first FPS value is something odd.
This patch fixes it by initializing last FPS time with the callback_data passed in
the first callback.
Reviewed-by: Nils Chr. Brause <nilschrbrause@gmail.com>
2014-08-18 15:27:16 +03:00
vivek
31732f7c68
Clients: Fix memleak issues in various clients of weston
...
In many clients of weston, Display was not being destroyed so added it.
Also destroy windows, widgets which were not being destroyed.
Signed-off-by: vivek <vivek.ellur@samsung.com>
Reviewed-by: Pekka Paalanen <ppaalanen@gmail.com>
Reviewed-by: Bryce Harrington <b.harrington@samsung.com>
2014-06-24 10:22:43 -07:00
Cameron Stewart
4c4bb953fc
Rename invocations of frame_create that were missed by ee7fefcf
...
For some reason it not only compiled with different parameters but the
method succeeded and just failed later.
2013-10-21 21:04:08 -07:00
Peter Hutterer
f3d62276d2
malloc + memset -> zalloc
...
And for clients using the xmalloc helper, use xzalloc.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-08-08 13:46:13 -07:00
Kristian Høgsberg
4172f668e7
Pass argc pointer to parse_options()
...
This lets us keep argc up to date as the backend picks out arguments
from the argv array.
2013-02-20 15:27:49 -05:00
Kristian Høgsberg
2995c517c5
gears: Keep gears inside screen in fullscreen mode
2012-07-26 23:53:05 -04:00
Olivier Blin
7679d9a62e
gears: add a warning about refresh rate limitation
2012-07-26 22:03:41 -04:00
Olivier Blin
a1d0cf5d69
gears: show FPS count (as in glxgears from mesa/demos)
2012-07-26 22:03:21 -04:00
Olivier Blin
fa820efaf0
gears: add fullscreen support
2012-07-25 16:21:13 -04:00
Daniel Stone
4dbadb1556
Use enum wl_pointer_button_state instead of integer
...
Instead of using a uint32_t for state everywhere (except on the wire,
where that's still the call signature), use the new
wl_pointer_button_state enum, and explicit comparisons.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-05-31 15:42:47 -04:00
Ander Conselvan de Oliveira
dc8c8fce72
window: rename enum pointer_type to cursor_type
...
This avoids confusion with the pointer devices (struct wl_pointer).
2012-05-25 23:28:54 -04:00
Ander Conselvan de Oliveira
d8f527c845
window: track changes in libwayland-cursor api
...
libwayland-cursor does not provide enum wl_cursor_type anymore so this
brings back enum pointer_type.
This partially revers commit 1042dc15e0
.
2012-05-25 23:09:06 -04:00
Ander Conselvan de Oliveira
1042dc15e0
window: use libwayland-cursor instead of libXcursor
2012-05-22 10:17:34 -04:00
Kristian Høgsberg
4c3dac9c66
clients: Remove superfluous #includes
...
In particular window.c and many clients were including glib.h without
using it and without the right cflags.
2012-05-11 16:40:22 -04:00
Kristian Høgsberg
80680c7b75
window.c: Just use float instead of GLfloat, remove GLES2.h include
2012-05-10 14:11:44 -04:00
Daniel Stone
b230a7ee58
Convert internal input co-ordinates to GLfloat
...
Change all client motion handlers to take GLfloat for co-ordinates,
rather than int32_t.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-05-08 14:40:57 -04:00
Daniel Stone
5d66371743
Change button from int to uint32_t
...
Since you can't really have a negative button number.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-05-07 12:57:11 -04:00
Daniel Stone
da5b93c8d7
Change key/button grab bindings to take unsigned state
...
'state' here meaning 'is it up or down?', obviously.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-05-07 12:54:14 -04:00
Scott Moreau
7890c4d36d
gears: Allow model rotation with pointer
2012-04-25 10:52:43 -04:00
Kristian Høgsberg
875ab9e735
Add signedness warning flag and fix fallout
2012-03-30 11:52:39 -04:00
Kristian Høgsberg
bcacef19b0
Add an option parser
...
On one hand, getopt (in particular the -o suboption syntax) sucks on the
server side, and on the client side we would like to avoid the glib
dependency. We can roll out own option parser and solve both problems
and save a few lines of code total.
2012-03-12 01:28:50 -04:00
Kristian Høgsberg
010f98b083
window: Track and report input and opaque regions
...
We just set the input region to the bounding box of the window frame
and set the opaque region to be the opaque rectangle inside the window
if the child widget is opaque.
2012-02-23 17:30:54 -05:00
Tiago Vignatti
0a26641626
clients: fix spelling
...
Signed-off-by: Tiago Vignatti <vignatti@freedesktop.org>
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2012-02-13 11:52:24 +02:00
Kristian Høgsberg
009ac0a965
window: Dont take width and height in window constructor
...
Always set this by scheduling an initial resize.
2012-01-31 15:24:48 -05:00
Kristian Høgsberg
5f5324e098
gears: Make window transparent
...
We need this for the window decorations.
2012-01-19 14:05:21 -05:00
Kristian Høgsberg
29af3ebce6
window: Make decorations just a widget
...
Woohoo, only took 25 commits of refactoring to get to this point.
2012-01-10 22:41:55 -05:00
Kristian Høgsberg
bb97700474
window: Get rid of the window child allocation concept
2012-01-10 19:11:42 -05:00
Kristian Høgsberg
b67e94b170
window: Make resize and redraw handlers widget vfuncs
2012-01-10 14:22:10 -05:00
Kristian Høgsberg
5d12990dbe
window: Allocate and flush the window surface in window.c
...
No need to push this to the toolkit users.
2012-01-10 12:25:32 -05:00
Kristian Høgsberg
c5241f5b73
Never include wayland-util.h directly
...
And fix a missing "" to <> conversion for wayland-client.h include.
2011-11-22 09:35:14 -05:00
Pekka Paalanen
50719bce2a
Fix inconsistent #include style
...
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2011-11-22 09:27:03 -05:00
Benjamin Franzke
1a89f28c7d
gears: Fail if compiled without cairo-egl
2011-10-07 10:06:01 +02:00
Benjamin Franzke
0c99163d9b
window: Create a cairo device for each egl config
2011-10-07 10:06:01 +02:00
Kristian Høgsberg
3a69627f43
window: Stop using glib mainloop in toy toolkit
2011-09-19 17:28:55 -04:00
Kristian Høgsberg
6da3812f0a
gears: Don't schedule redraw, just draw from frame callback
2011-08-29 17:12:37 -04:00
Kristian Høgsberg
9de79a92a6
window.c: Drop global handler argument
...
We can just register a global handler directly on the wl_display now.
2011-08-29 17:12:36 -04:00
Kristian Høgsberg
a8d1fa762e
clients: Bring clients up to date
2011-08-29 17:12:36 -04:00
Kristian Høgsberg
11e2828bdc
Merge remote-tracking branch 'bnf/surface-frame-event'
...
Conflicts:
compositor/compositor.c
2011-04-11 16:47:50 -04:00
Tim Wiederhake
b4b67344f0
Define global handler on display creation
...
Otherwise the initial announcement of interfaces gets lost.
2011-04-11 13:16:33 -04:00
Benjamin Franzke
cff904e69d
gears: Use wayland egl surface instead of images
2011-03-17 15:55:25 +01:00
Benjamin Franzke
6693ac2108
window: Use window surfaces for windows
2011-03-17 15:55:18 +01:00
Benjamin Franzke
ec4d342aa9
Support per surface frame events
...
This fixes tearing with multi head.
2011-03-17 11:54:35 +01:00
Kristian Høgsberg
f57a96f98d
gears: Remove unused drm_fd field
2011-02-07 09:12:56 -05:00
Kristian Høgsberg
297c6313eb
Port window.c to use wayland-egl
2011-02-07 09:12:56 -05:00
Kristian Høgsberg
00439617f3
Fix new gcc 4.6 warnings
...
simple-client.c:156:10: warning: variable ‘ar’ set but not used [-Wunused-but-set-variable]
etc.
2011-01-25 15:16:01 -05:00
Kristian Høgsberg
248c1b61ce
Add an orange pop-up menu to test the new map_transient request
2011-01-21 18:03:15 -05:00
Kristian Høgsberg
8def264241
Check for cairo-egl instead of just cairo-gl
2011-01-14 17:42:50 -05:00
Kristian Høgsberg
da846ca91d
Fix terminal resizing
...
Get snapping to character grid working again, avoid crashes when attempting
to resize below 1x1 character cell, only redraw when size actually changes.
Also, rename window_get_child_rectangle() to window_get_child_allocation().
2011-01-11 10:00:52 -05:00
Kristian Høgsberg
96ce968b12
gears: Include config.h
2011-01-07 14:42:49 -05:00
Kristian Høgsberg
1926ebab73
Add missing newline in gears error message
2011-01-07 14:04:43 -05:00