Commit Graph

2181 Commits

Author SHA1 Message Date
Kristian Høgsberg bb262cf45c desktop-shell: Fix broken clock indentation 2012-06-11 11:03:03 -04:00
Pekka Paalanen 4e4167d3a0 compositor: log more EGL and GL info
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2012-06-11 09:48:34 -04:00
Pekka Paalanen 1b3c1ea880 compositor: log module loading
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2012-06-11 09:48:02 -04:00
Pekka Paalanen 7f4d1a3534 compositor: move uname log earlier
Basic information that does not depend on any modules.

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2012-06-11 09:47:55 -04:00
Pekka Paalanen 29e09a92cb ignore git-version.h
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2012-06-11 09:47:43 -04:00
Pekka Paalanen bce4c2b1ca compositor: prettify program info in log
No need to print current date-time anymore, since log.c does the date
automatically.

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2012-06-11 09:47:26 -04:00
Martin Minarik f5c7576581 compositor-android.c: Add missing include log.h
Due to missing include, the messages from
compositor-android are not processed.

Thanks to collegue for reminding of this issue.
2012-06-11 09:43:02 -04:00
Martin Minarik bae4351931 Log: Remove date from timestamp, log it only once.
This patch may be useful, the timestamp with date seems too long.
2012-06-11 09:42:57 -04:00
Martin Minarik f12c2879c6 compositor: Print uname information to log
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
2012-06-11 09:42:08 -04:00
Rafal Mielniczuk b9e513c678 desktop-shell: move panel_add_clock call to panel_create function
Putting panel_add_clock in launcher_section_done handler
will cause clock to be created multiple times with every launcher.
Fix is to move the call to panel_create function.
2012-06-11 09:37:46 -04:00
Rafal Mielniczuk 6e0a7d82b7 compositor: change position of weston_log_file_open call
In case XDG_RUNTIME_DIR was not set, weston_log
will crash the compositor instead of spitting
error msg, as weston log was not yet opened
2012-06-11 09:37:02 -04:00
Scott Moreau d64cf21246 Add frame_counter to weston_animation. 2012-06-11 09:33:06 -04:00
Scott Moreau 9d1b1125fd Move animation_list to weston_output. 2012-06-11 09:32:47 -04:00
Kristian Høgsberg c3a13cc6cf tests: Use weston_surface_to_global_float
Forgot to update use of weston_surface_to_global() here.
2012-06-09 08:46:51 -04:00
Kristian Høgsberg 70226bbda6 clock: Read fd to avoid 100% cpu usage
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.
2012-06-08 16:54:52 -04:00
Kristian Høgsberg fc9c5e04fd log: Add some diagnostics to the log
Just a few useful things to get this started: egl vendor and extensions,
gles2 extensions, drm and kms info and just a bit of x11 backend info.
2012-06-08 16:45:33 -04:00
Kristian Høgsberg a411c8b66c log: Print sha1 of HEAD and the date and time as the first thing in the log 2012-06-08 16:16:52 -04:00
Kristian Høgsberg a7496e1c61 Add a makefile hook to generate git-version.h 2012-06-08 16:16:16 -04:00
Martin Minarik eb587650d2 log: Fixes
Drop the timestamp caching because it doesn't seem useful.
Use gettimeofday() to obtain system time.
Add null checks to both contstructor and destructor.
Drop the flushing and set line buffering instead.
Remove weston_log_print(), it only wraps vfprintf anyways.
2012-06-08 15:14:37 -04:00
Martin Minarik 6d11836721 Replace fprintf() by weston_log() 2012-06-08 13:11:36 -04:00
Martin Minarik 19e6f2693d Add logging functionality
This is logging functionality for weston compositor.

It handles:
messages coming from libwayland-server from wl_log()
messages from weston itself, from weston_log()

Introduce --log option, to specify log file path on the command line.
When the path is incorrect, or on weston_log_file_destroy(), fall
back to stderr.
2012-06-08 13:11:29 -04:00
Pekka Paalanen 3ab7269a9b compositor: return failure even if SEGV handler works v2
Weston has a SIGSEGV handler that attempts to shut everything down
cleanly. If it actually succeeds in that, the process exit status will
indicate success, when the process just segfaulted.

Fix that by setting the return value to failure in the SEGV handler.

v2: use a local instead of a global variable

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2012-06-08 12:52:18 -04:00
Martin Minarik 1e51a87f13 desktop-shell: Add panel clock
A panel clock.
2012-06-08 12:52:06 -04:00
Kristian Høgsberg b2af93ef8c compositor: Drop weston_surface_to_global()
Just always call weston_surface_to_global_float() instead.
2012-06-07 20:10:23 -04:00
Kristian Høgsberg 9a050afc06 compositor: Emit destroy signal when we manually destroy a weston_surface 2012-06-07 18:17:42 -04:00
Kristian Høgsberg 633b14505c shell: Emit destroy signal for when we manually destroy shell surface 2012-06-07 18:08:47 -04:00
Kristian Høgsberg 47b5dca409 shell: Don't remove grab listener if surface was destroyed 2012-06-07 18:08:04 -04:00
Scott Moreau 3f79d661a1 zoom: Convert wl_fixed_t directly into floats, to avoid truncation.
This fixes center point inaccuracy for rotated surfaces. Thanks to
Pekka Paalanen for spotting it.
2012-06-07 17:15:32 -04:00
Pekka Paalanen bdc7cd06d1 compositor: fix a crash on missing keyboard device
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2012-06-07 16:44:13 -04:00
Pekka Paalanen 43e1ba8073 shell: fix crash when no pointer device
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2012-06-07 16:43:56 -04:00
Pekka Paalanen 36f155f80f compositor-x11: add an option to ignore input
For testing the compositor without any input devices. Exposes cases
where e.g. keyboard or pointer are NULL-dereferenced.

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2012-06-07 16:43:40 -04:00
Pekka Paalanen 4e1f2ff1c6 shell: fix a crash during 'make check'
$ abs_builddir=$PWD/tests gdb -args ./src/weston --module=$PWD/tests/.libs/event-test.so

(gdb) run
Starting program: /home/pq/git/wayland-demos/src/weston --module=/home/pq/git/wayland-demos/tests/.libs/event-test.so
[Thread debugging using libthread_db enabled]
Mesa: Initializing x86-64 optimizations
launching /home/pq/git/wayland-demos/tests/test-client
created output global 0x608f50
test-client: got create-surface
got surface 5 from client
got surface id 5

Program received signal SIGSEGV, Segmentation fault.
Mesa: Initializing x86-64 optimizations
0x00007fffeff72c7c in handle_pointer_focus (listener=0x74f5c0, data=0x6faa40) at shell.c:492
492		if (shsurf->unresponsive) {
(gdb) bt
 #0  0x00007fffeff72c7c in handle_pointer_focus (listener=0x74f5c0, data=0x6faa40) at shell.c:492
 #1  0x00007ffff5ed8b87 in wl_signal_emit (data=0x6faa40, signal=0x6faa88) at wayland-server.h:166
 #2  wl_pointer_set_focus (pointer=0x6faa40, surface=<optimized out>, sx=12800, sy=12800) at wayland-server.c:752
 #3  0x0000000000407d92 in weston_device_repick (seat=0x6fa930) at compositor.c:633
 #4  0x0000000000407e49 in weston_compositor_repick (compositor=0x61c510) at compositor.c:656
 #5  0x00000000004092e1 in weston_output_repaint (output=0x7b85b0, msecs=-1046834186) at compositor.c:1059
 #6  0x00000000004094b4 in weston_output_finish_frame (output=0x7b85b0, msecs=-1046834186) at compositor.c:1092
 #7  0x00007ffff211e3c1 in finish_frame_handler (data=0x7b85b0) at compositor-x11.c:284
 #8  0x00007ffff5eda603 in wl_event_source_timer_dispatch (source=0x79ee50, ep=<optimized out>) at event-loop.c:173
 #9  0x00007ffff5edaca0 in wl_event_loop_dispatch (loop=0x61b940, timeout=<optimized out>) at event-loop.c:410
 #10 0x00007ffff5ed8dbd in wl_display_run (display=0x61b8f0) at wayland-server.c:1025
 #11 0x000000000040ecb1 in main (argc=1, argv=0x7fffffffdd98) at compositor.c:3225
(gdb) print shsurf
$1 = (struct shell_surface *) 0x0

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2012-06-06 13:27:56 -04:00
Pekka Paalanen 78a0b57e57 compositor: print a clear message when XDG_RUNTIME_DIR is not set
Without this patch, Weston would not start with the message:
creating a keymap file for 44012 bytes failed: No such file or directory

If you do not know, that we use XDG_RUNTIME_DIR for that, the message is
very confusing. Therefore implement a clear error message right at the
start if XDG_RUNTIME_DIR is not set.

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2012-06-06 13:27:04 -04:00
Pekka Paalanen 1da1b8f3f1 Rewrite shm buffer file allocation v2
We had duplicated code in many places, using hardcoded paths for
temporary files into more than one path. Some cases did not bother with
O_CLOEXEC, and all hardcoded paths that might not exist.

Add an OS helper function for creating a unique anonymous file with
close-on-exec semantics. The helper uses $XDG_RUNTIME_DIR as the
directory for a file.

This patch unifies the buffer file creation in both Weston and the
clients.

As simple clients are better not linking to libshared, as it would
require e.g. Cairo, they pull the OS compatibility code directly.

Android does not have mkostemp(), so a configure test is added for it,
and a fallback used if it is not available.

Changes in v2:
	remove all the alternate possible directory definitions and use
	XDG_RUNTIME_DIR only, and fail is it is not set.

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2012-06-06 13:26:30 -04:00
Bill Spitzak b715ceca33 compositor-x11: Return number of events processed
The event handler is supposed to return 0 if no events were handled and
a positive number if events were handled.  event always end up being NULL
however, so we always return 0.
2012-06-05 17:08:23 -04:00
Tiago Vignatti 771241e88f xwm: use override_redirect for determining or not top-level windows
"top-level window is a window whose override-redirect attribute is False",
ICCCM 4.1.1

Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
2012-06-05 11:49:18 -04:00
Tiago Vignatti 71574542b3 xwayland: fix typo on configure libs
Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
2012-06-05 11:46:51 -04:00
Kristian Høgsberg be375b362b xwm: Only destroy window frame in unmap_notify if we have one
Based on a patch from Tiago Vignatti <tiago.vignatti@intel.com>.
2012-06-05 11:46:08 -04:00
Kristian Høgsberg 9892a62b45 compositor: Remove left-over 'bright' shader uniform 2012-06-05 10:49:22 -04:00
Kristian Høgsberg 361039820b compositor: Drop brightness and saturation features in the shader 2012-06-05 10:15:56 -04:00
Kristian Høgsberg d56bd908bf shell: Use a busy cursor animation for unresponsive surfaces 2012-06-05 09:58:51 -04:00
Kristian Høgsberg 7cee19778a window.c: Add primitive support for animated cursors
This just adds an entry point to set a specific frame of an animated cursor.
2012-06-04 23:39:04 -04:00
Kristian Høgsberg f33984edea window.c: Set focus widget before calling enter handler
This way input_get_focus_widget() returns the right widget when
called from the enter handler.
2012-06-04 23:36:32 -04:00
Kristian Høgsberg 4e99ac4f20 compositor: Set pointer->current before calling focus handler
The grab interface handlers all expect pointer->current to identify
the surface under the pointer regardless of grabs etc.  Thus, we need
to set it before calling the focus handler.
2012-06-04 16:12:38 -04:00
Kristian Høgsberg 8591dbf8b5 window.c: Add watch cursor 2012-06-04 16:10:40 -04:00
Kristian Høgsberg 5a4e9ff51b window.c: Drop timestamp argument to input_set_pointer_image()
We need the serial to set a pointer image and we track that internally.
2012-06-04 16:04:07 -04:00
Scott Moreau 6597506ac3 Remove Intel from text-cursor-position.c copyright header. 2012-06-04 11:08:26 -04:00
Scott Moreau 9295ce05ab Drop user input detection from text cursor position implementation. 2012-06-04 11:07:54 -04:00
Scott Moreau ae71220fc9 Convert text cursor position protocol to use fixed types. 2012-06-04 11:07:50 -04:00
Daniel Stone bbf63bf92c Fix inverted LEDs
Turns out it's probably better to post the new state rather than the
old.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-06-04 11:03:02 -04:00