The kernel is supposed to set this when drmModeSetCrtc() is called but
at least the i915 driver wouldn't do that in all cases. A fix for this
should be released with kernel 3.10, but we work around the issue in
older kernels by always forcing DPMS to ON when doing a mode set.
https://bugs.freedesktop.org/show_bug.cgi?id=64873
Another case of missing wayland-util.h, as we didn't pass any libwayland
CFLAGS. This is triggerable on a system, where libwayland is installed
in a custom prefix, and pixman, cairo, libpng, and webp are either
not installed or are installed in the standard path.
COMPOSITOR_CFLAGS contains more than just the libwayland CFLAGS, though.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
A wayland compositor doesn't provide a mechanism for buffer sharing between
clients. Under X, one client can render to a Pixmap and another can use it
as a source in a subsequent drawing operations. Wayland doesn't have a
mechanims to share Pixmaps or textures between clients like that, but it's
possible for one client to act as a nested compositor to another client.
This less work than it sounds, since the nested compositor won't have to
provide input devices or even any kind of shell extension. The nested
compositor and its client can be very tightly coupled and have very specific
expectations of what the other process should provide.
In this example, nested.c is a toytoolkit application that uses cairo-gl
for rendering and forks and execs nested-client.c. As it execs the client,
it passes it one end of a socketpair that will be the clients connection
to the nested compositor. The nested compositor doesn't even create a
listening socket.
The client is a minimal GLES2 application, which just renders a spinning
triangle in its frame callback.
Ignore the whole commit-string or preedit_string transaction when the
delete_surrounding event was invalid.
Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
Delete text marked with wl_text_input::delete_surrounding_text on
preedit_string event. When text is explicitly marked with
delete_surrounding_text do not delete selected text.
Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
exit() calls atexit() handlers and C++ destructors (e.g. a C++
weston module) which could destroy state that the main process
depends on (e.g. ioctl's, tmpfiles, sockets, etc...). If an exec
fails, call _exit() instead of exit().
v2: prefer _exit over _Exit
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
The old code had an off-by-one error on the y coordinate
where it says height - (cur_y - y). And it does the vflipping of
the *destination* buffer, whereas what is really needed is to
vflip the whole source buffer. This only affects when you read
out part of the image, such as when using the screen recoder.
Also, instead of doing the flipping manually we just let pixman
handle it.
When a window is fullscreened with DRIVER method and we succeeded
in changing mode we need to actually move the surface to the
origin of the output, or it won't be used for scanout.
Right now we only switch mode on activating a fullscreened window.
This has several problems:
* Once you're in fullscreen its hard to switch to a non-fullscreened
window with alt-tab as you stay in the small resolution.
* If you switch from a fullscreened window to a non-fullscreened
window and the fullscreened window is destroyed we will not
restore the original mode (since the window is not
shell_surface_is_top_fullscreen()
* Its hard to reach a different output on the right with the mouse
when the mode is smaller that the original, as there is a "gap"
between the two outputs. So, if you alt-tab to another window
you can not always reach it.
This is somewhat of a sledge hammer, as it means you can't e.g.
focus a non-fullscreen on one output and have a window fullscreened
on another output. However, trying to restore only the outputs
the new window is on is problematic:
* It may later change output
* We want to see all windows anyway during alt-tab
* Can't reach the other windows with the mouse anyway
So, this seems like an ok solution.
It may happen that you e.g. fullscreen a 800x600 surface with
buffer_scale 1 (e.g. a 800x600 buffer) on an output that is
otherwise scale 2. In this case we want to temporarily set
the output scale to 1, as we're really scanning out of a
scale 1 buffer. This causes us to e.g. report the input
positions in the right place, etc.
When we restore the original mode we also restore the original
scale.
Note that the scale change is a purely compositor internal change,
to clients it still looks like the output is scale 2.
We changed the protocol to always list modes in physical pixel
units (not scaled). And we removed the scaled mode flag. This
just updates the DRM and X11 compositors and the gl and pixman renderers
to handle this.
This lets you try fullscreen in different methods, sizes, scales,
translations, etc. You can verify both output and input (via mouse over
of the rectangles).
It was erronously using output->current->height in one
place where it should use output->height. This may cause
it to create an invalid clipped coordinate in case of output
scaling or transform, because the next round "prev" would
end up NULL.
backtrace:
(gdb) bt
#0 0xb7704424 in __kernel_vsyscall ()
#1 0xb757ddde in raise (sig=5) at ../nptl/sysdeps/unix/sysv/linux/pt-raise.c:42
#2 <signal handler called>
#3 weston_config_destroy (config=0x0) at config-parser.c:508
#4 0xb75cbc0e in x11_destroy (ec=0x93506b0) at compositor-x11.c:1473
#5 0x0804e0e9 in main (argc=1, argv=0xbffe5354) at compositor.c:3337
The current config parser, parses the ini file and pulls out the values
specified by the struct config_section passed to parse_config_file() and
then throw the rest away. This means that every place we want to get
info out of the ini file, we have to parse the whole thing again. It's not
a big overhead, but it's also not a convenient API.
This patch adds a parser that parses the ini file to a data structure and
puts that in weston_compositor->config along with API to query comfig
keys from the data structure. The old parser is still available, but
we'll transition to the new approach over the next few commits.