Age | Commit message (Collapse) | Author | Files | Lines |
|
Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
|
|
get_xserver_window() is retrieving the *first* occurrence of xserver_window
found by a surface that has the surface_destroy function. This doesn't work
when position and kill listeners need to retrieve the exact window of its
surface. Retrieve the pointer based on container is enough though.
This patch fix an issue where xserver_send_configure was being sent repeatedly
to the same window without the need.
Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
|
|
There is a race where the WM sends the opaque_override region for a window
but X has not sent yet the window surface. This patch fix it by introducing a
pointer that keeps the pending opaque override region, to be set later.
There is no way for the compositor tell beforehand whether a window received
its surface from X. The client also doesn't know about it, so the region
created on client side cannot be destroyed right after passed to
wm_xwin.set_opaque_override. Therefore this semantic of the request has
changed and described on the protocol.
This patch fix the problem where override-redirected X windows were not setting
opaque override region correctly.
Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
|
|
In particular, opaque_override and input_region were accessing these dangling
pointers.
Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
|
|
If there's a decorating drawing scheduled and the app asked for destroy the
window, the xwm_window will be instantly freed and used with trash value later
once xwm_window_draw_decoration() kicks in.
This patch schedule the window destroy handler in order to be deferred only
after the drawing one.
To test the issue: open gedit and then close it; it will segfaults xwm.
Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
|
|
This commit implements the selection proxy to connect XWayland copy-paste with
the Wayland one, bringing back the last remaining feature we had before the
xwm was split as a client (#2 selection support).
It connects the clipboard also for dealing with clients that go away. Worth to
note that this only brings the needed implementation for porting selection to
weston-xwm client and, that being said, I'm sure there are corn cases still to
be solved.
For testing, I'm opening one X gedit and one weston-terminal and then
selecting text and performing copy-paste on both directions.
Tested-by: Scott Moreau <oreaus@gmail.com>
Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
|
|
The file was changed, moved to client side and a few variable names were
changed (like s/weston_wm/xwm_wm).
There's no functional changes yet, meaning that XWayland selection code is
completely disable still. But this will help to track the changes on the
following commit.
Tested-by: Scott Moreau <oreaus@gmail.com>
Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
|
|
This patch brings back a feature we removed previously (#1 opaque region box)
and fix the input region settings, which was broken.
Tested-by: Scott Moreau <oreaus@gmail.com>
Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
|
|
This patch solves the window positioning problem through forwarding its global
coordinates to X. A new type of shell surface is need for doing so, the
xwayland (description and details of it are on the previous commit and also in
the protocol).
The approach used here shows a weakness of the Weston WM-as-client
architecture: one cannot guarantee that the X11 stream needed to create
windows with its right position will happen before Weston maps the surface,
via Wayland. IOW we'd like always ConfigureNotify with the coordinates coming
and only then Wayland compositor could map the surface:
1. xwm: gets XCB_CREATE_NOTIFY (via X11)
2. xwm: gets XCB_CONFIGURE_NOTIFY (via X11)
3. weston: gets correct position (wm_get_window, via Wayland)
4. weston: maps the surface (xserver_get_window_surface, via X11)
but it was happening:
1. xwm: gets XCB_CREATE_NOTIFY (via X11)
2. weston: maps w/ wrong position (xserver_get_window_surface, via X11)
3. xwm: gets XCB_CONFIGURE_NOTIFY (via X11)
4. weston: gets outdated position (wm_get_window, via Wayland)
The problem now is that we have to control the order of two different stream
in one process only. We haven't faced this before with a single Weston + XWM
process because that was controlled by the time the event was touching the fd.
In order to solve that, we introduce a new request (wm_xwin.map) telling the
moment X Window is ready for mapping (MapNotify arrived) and a new event
(xserver.send_map) to forward it to X, which in turn will reply back to the
compositor with the actual mapping request (xserver.set_window_surface).
Therefore doing so all the mapping is managed and ordered via Wayland stream.
This patch brings back a feature we removed previously (#3 window positioning)
and also put the X Windows in their global position (for instance, now xeyes
works like expected and also menu windows are shifted correctly regarding
output's dimensions).
Tested-by: Scott Moreau <oreaus@gmail.com>
Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
|
|
Worth to note this type of shell surface is not exposed for clients but just
used internally. XWayland compositor counter-part is not implemented yet; next
commit will bring it on.
weston_shell_interface was also documented on this commit.
Tested-by: Scott Moreau <oreaus@gmail.com>
Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
|
|
It brings back a feature we removed previously:
#4 drawing scheduling and window activation
Tested-by: Scott Moreau <oreaus@gmail.com>
Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
|
|
No functional changes.
Tested-by: Scott Moreau <oreaus@gmail.com>
Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
|
|
The new protocol features the separation of the X Window Manager from Wayland
compositor. Compared with the previous protocol, it aims to avoid mutual
deadlock where Weston waits for a reply to get xcb_get_property(), while X is
waiting in some wl_display_roundtrip(). Other advantages exist also like the
ease for replacing the decoration logics (border, cursors, icons etc) or even
the whole implementation of XWayland on different compositors.
There are now three interfaces. 'xserver' and 'wm' interfaces are the global
object for connecting and initializing X and WM respectively. In special 'wm'
has a request wm.create_xwindow for instantiate the third interface,
'wm_xwin'.
A WM client now notifies the compositor about X Windows configuration
(wm_xwin.set_window) while X creates their Wayland surfaces. All the
information is combined (xserver.set_window_surface) inside the compositor
which itself map the windows on screen (eg create_shell_surface ->
set_toplevel, at window-manager.c).
The implementation consists of a new toytoolkit client, the weston-xwm. The
client at the moment is not using any toytoolkit drawing API; it simply
uses for its high-level abstraction and convenience. I have plans later
though, to replace the weston-xwm cursor settings and border decorations by
the ones toytoolkit provide.
Changes on XWayland X server side are needed as well. Some features are still
missing from the previous implementation though:
#1 opaque region box
#2 selection support
#3 window positioning
#4 drawing scheduling and window activation
Tested-by: Scott Moreau <oreaus@gmail.com>
Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
|
|
Warning: this break hardly XWayland (not even compile), but it will help to
track the changes on the following commits.
renamed: src/xwayland/window-manager.c -> clients/xwm.c
renamed: src/xwayland/window-manager.h -> clients/xwm.h
Tested-by: Scott Moreau <oreaus@gmail.com>
Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
|
|
In preparation for split xwm as a client, we'll need the hash on both
compositor and client side.
At this point, X clients are still being mapped okay on the screen and in some
way are useful.
Tested-by: Scott Moreau <oreaus@gmail.com>
Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
|
|
In preparation for split xwm as a client.
Tested-by: Scott Moreau <oreaus@gmail.com>
Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
|
|
Warning: this removes functionality (#4)
In preparation for split xwm as a client, we want to get rid of all
interactions of the compositor event loop here. Decorations and configure
mechanisms will be overhauled later anyway.
Tested-by: Scott Moreau <oreaus@gmail.com>
Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
|
|
Warning: this removes functionality (#3)
In preparation for split xwm as a client. In any case this wasn't functioning
properly and we need to change with a different scheme of forwarding the
global coordinates to X instead:
http://lists.freedesktop.org/archives/wayland-devel/2012-July/004537.html
Tested-by: Scott Moreau <oreaus@gmail.com>
Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
|
|
Warning: this removes functionality (#2)
In preparation for split xwm as a client; this will be re-implemented later.
Tested-by: Scott Moreau <oreaus@gmail.com>
Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
|
|
Warning: this removes functionality (#1)
In preparation for split xwm as a client, xwm client won't be able to modify
or access weston_surface directly like that. This will be re-implemented later
using set_opaque_region instead, so we disable for now.
Tested-by: Scott Moreau <oreaus@gmail.com>
Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
|
|
xwayland.h now has only private declarations to be shared between launcher.c,
selection.c and window-manager.c. window-manager.h is a new header containing
WM specific declarations.
The real motivate for this patch though is to serve in preparation for split
xwm as a client; in the future window-manager.h will be the xwm client header.
Tested-by: Scott Moreau <oreaus@gmail.com>
Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
|
|
Without this we try to load the installed backends, which is nasty for
regular runs, and just doesn't work for make distcheck, which sets
prefix to $PWD/_inst. This makes sure we load the right backend
and make distcheck pass. Other modules (xwayland, shells etc) just don't
get loaded for distcheck and for make check we still try to load the
installed modules.
|
|
Call drm_output_init_egl() instead of duplicating the gbm surface and
gl renderer state initialization code.
Note that this makes error handling a bit worse. Before, if we failed
to allocate a gbm surface we could still recover. Failing the renderer
state creation would lead to inconsisten state. Now we end up in
inconsistent state on both cases.
|
|
|
|
At this point, we reallocated the gbm surface, but we don't have an
fb with the right size to use. If we're going to a larger mode, the fb
would be too small and the mode set would fail. Besides, the repaint
logic will already do a mode set if necessary, so rely on that instead.
|
|
gl_rederer_output_create() returns 0 on success, but drm compositor
would consider this a failure.
|
|
When an output suffers a mode switch, it is possible that a pointer
was inside the old output area but falls outside of it with the new
size. In that case, move the cursor to the output's bottom-right
corner. Otherwise, there's a crash in clip_pointer_motion().
|
|
After a mode switch, the output region and transformation matrix need
to be updated. The call to weston_output_move() would do the former but
not the latter, but calling that when the output remains in the same
coordinate doesn't make much sense. Instead, update this state and the
transformation matrix in weston_output_mode_switch().
|
|
Add options for setting width, height and using the driver fullscreen
method.
|
|
|
|
|
|
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
|
|
Add a macro that wraps wl_display_roundtrip() and check for errors. It
is a macro, so that the assert would show the relevant file and line
number.
This will also catch protocol errors, that would go unnoticed otherwise.
All roundtrips in tests are replaced with the check.
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
|
|
Otherwise we cannot normally see protocol errors etc. in the test
output.
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
|
|
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
|
|
This cleans up the 'make check' output considerably. When all goes well,
you will only see the "PASS" line for each of $TESTS.
Weston logs into a separate file than stdout and stderr, so server logs
end up in one file per test, and other output to another file per test.
'make distclean' does not remove the tests/logs/ directory.
Also changes the weston-tests-env interpreter to bash, since I think &>
and ${1/.la/.so} might be bashisms.
|
|
The remaining module tests don't need to fork and talk to a test client,
so just convert them to regular modules and let them handle running their
tests themselves. Then drop test-runner.[ch].
|
|
This test case is the last user of the test-client code and it only
tests launching the test-client. In other words it's a minimal test
of the framework we're dropping, so just drop this test.
|
|
So much simpler this way and the test suite is now back too 100% pass.
|
|
Remaining use case was when we move the pointer. This doesn't change
geometry so we can just use a wl_display_roundtrip() to make sure
we get the request to the server and receive the resulting events.
|
|
As for button-test, a wl_display_roundtrip is sufficient here. The
yield() between wl_test_activate_surface() and wl_test_send_key() is
also not needed, since the two requests will arrive at the server in
order, and will activate the surface first, then send a key event.
|
|
A round trip is sufficient here. We need to make sure that the server
has received the wl_test request and that we've received the event
that the request triggers. The wl_display_roundtrip() helper does
exactly that: it sends a wl_display.sync request, which will hit the
server after the wl_test requests and thus the wl_callback.done event
will come back after the server has seen all the previous requests and
after we've handled all preceeding event.
|
|
When moving a test surface, use a frame callback to make sure the
surface has been moved and the geometry updated. The compositor may
delay updating the transform matrices, but once we get the frame
callback we know the surface has been repainted and the geometry
updated.
|
|
Fixes https://bugs.freedesktop.org/show_bug.cgi?id=56821
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
|
|
Fixes https://bugs.freedesktop.org/show_bug.cgi?id=56819
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
|
|
This adds a weston-test-runner for the weston test extension and
some weston test client helper methods.
Converted keyboard-test to use the new test interface, runner,
and helper methods.
Fixes https://bugs.freedesktop.org/show_bug.cgi?id=56822
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
|
|
The weston-tests-env script needs to be able to handle weston
test extension style tests as well as module style tests.
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
|
|
Renamed weston-test test environment script to weston-tests-env
to avoid ambiguity with weston-test.c (the weston test extension).
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
|
|
The weston test extension, called weston-test.so, can be loaded
from the "modules" configuration option on the command line
or in the .ini file.
Clients can bind to the "wl_test" interface to interact with
the weston test extension.
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
|
|
Finally a commit that actually makes simple-egl simpler.
|