summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2012-12-28xwayland: Destroy xwin resources after usedxwm-clientTiago Vignatti2-3/+10
Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
2012-12-28xwayland: Fix look up of xserver_window pointersTiago Vignatti1-5/+16
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>
2012-12-28xwayland: Fix opaque override region on override-redirected windowsTiago Vignatti3-5/+37
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>
2012-12-28xwayland: Null out surface pointers after surface is destroyedTiago Vignatti1-0/+3
In particular, opaque_override and input_region were accessing these dangling pointers. Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
2012-12-28xwm: Free and destroy xwm_window after all drawing is deferredTiago Vignatti1-9/+26
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>
2012-12-28xwayland: Proxy selection for copy-pasteTiago Vignatti7-158/+208
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>
2012-12-28xwayland: Move selection to client sideTiago Vignatti1-86/+83
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>
2012-12-28xwayland: Fix opaque and input region settingsTiago Vignatti3-31/+98
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>
2012-12-28xwayland: Fix window positioningTiago Vignatti6-6/+88
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>
2012-12-28shell: Add transient XWayland shell surfacesTiago Vignatti2-7/+58
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>
2012-12-28clients: xwm: Fix frame repaintTiago Vignatti2-15/+37
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>
2012-12-28clients: xwm: Remove all references for westonTiago Vignatti2-132/+129
No functional changes. Tested-by: Scott Moreau <oreaus@gmail.com> Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
2012-12-28Introduce new XWayland protocol and implementationTiago Vignatti9-277/+719
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>
2012-12-28xwayland: Move window-manager files to client directoryTiago Vignatti2-4/+4
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>
2012-12-28xwayland: Move hash implementation to sharedTiago Vignatti5-6/+6
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>
2012-12-28xwm: Change weston_log by fprintfTiago Vignatti1-34/+34
In preparation for split xwm as a client. Tested-by: Scott Moreau <oreaus@gmail.com> Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
2012-12-28xwm: Get rid of compositor loop handlersTiago Vignatti1-54/+22
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>
2012-12-28xwm: Remove support for transient windowsTiago Vignatti2-50/+9
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>
2012-12-28xwayland: Drop selection supportTiago Vignatti3-7/+4
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>
2012-12-28xwm: Disable opaque_rect settingsTiago Vignatti1-1/+4
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>
2012-12-28xwayland: Split header file in WM specific and XWayland internalsTiago Vignatti5-101/+124
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>
2012-12-14tests: Pass --backend so the test suite runs with the right modulesKristian Høgsberg1-1/+11
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.
2012-12-14compositor-drm: Reduce code duplication on drm_output_switch_mode()Ander Conselvan de Oliveira1-58/+29
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.
2012-12-14compositor-drm: Move output gl state initialization to own functionAnder Conselvan de Oliveira1-23/+36
2012-12-14compositor-drm: Don't do a mode set on drm_output_switch_mode()Ander Conselvan de Oliveira1-11/+0
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.
2012-12-14compositor-drm: Fix a return value check in drm_output_switch_mode()Ander Conselvan de Oliveira1-1/+1
gl_rederer_output_create() returns 0 on success, but drm compositor would consider this a failure.
2012-12-14compositor: Don't let pointers get outside of an output on mode switchAnder Conselvan de Oliveira1-0/+34
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().
2012-12-14compositor: Update output state after mode switchAnder Conselvan de Oliveira2-3/+19
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().
2012-12-14transformed: Add options for using debuging driver fullscreen methodAnder Conselvan de Oliveira1-3/+54
Add options for setting width, height and using the driver fullscreen method.
2012-12-14window: Allow clients to choose the fullscreen methodAnder Conselvan de Oliveira2-1/+13
2012-12-14clients: Add screenshooter-client-protocol.h to screenshooter sourcesKristian Høgsberg1-1/+4
2012-12-13tests: remove test logs on 'make clean'Pekka Paalanen1-0/+3
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2012-12-12tests: check wl_display_roundtrip() for errorsPekka Paalanen5-10/+13
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>
2012-12-12tests: set client log handlerPekka Paalanen1-0/+9
Otherwise we cannot normally see protocol errors etc. in the test output. Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2012-12-12update git ignoresPekka Paalanen2-0/+3
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2012-12-12tests: write logs to filesPekka Paalanen2-3/+16
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.
2012-12-11tests: Convert remaining module tests to not use test-runner.cKristian Høgsberg5-200/+33
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].
2012-12-11tests: Remove client-test testKristian Høgsberg3-546/+0
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.
2012-12-11tests: Port text-test to new test frameworkKristian Høgsberg5-429/+143
So much simpler this way and the test suite is now back too 100% pass.
2012-12-11tests: Drop yield() helper functionKristian Høgsberg4-31/+4
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.
2012-12-11keyboard-test: Use wl_display_roundtrip() instead of yield()Kristian Høgsberg1-4/+2
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.
2012-12-11button-test: Use wl_display_roundtrip instead of yield()Kristian Høgsberg1-2/+2
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.
2012-12-11weston-test-client-helper: Use a frame callback to flush surface geometryKristian Høgsberg1-2/+24
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.
2012-12-11tests: Convert button-test to new test extensionU. Artie Eoff3-111/+32
Fixes https://bugs.freedesktop.org/show_bug.cgi?id=56821 Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
2012-12-11tests: Convert event-test to new test extensionU. Artie Eoff3-265/+272
Fixes https://bugs.freedesktop.org/show_bug.cgi?id=56819 Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
2012-12-11tests: Convert keyboard-test to new test extensionU. Artie Eoff7-103/+835
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>
2012-12-11tests: Allow weston-tests-env to process different test typesU. Artie Eoff1-1/+9
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>
2012-12-11tests: Rename weston-test to weston-tests-envU. Artie Eoff2-2/+2
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>
2012-12-11tests: Define and implement a test protocol extension.U. Artie Eoff5-6/+338
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>
2012-12-11simple-egl: Remove old obsolete fbo and color_rbo fieldsKristian Høgsberg1-4/+0
Finally a commit that actually makes simple-egl simpler.