summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2014-01-07exposay: set an alpha on fullscreen surfacesHEADmasterEmilio Pozuelo Monfort3-0/+12
This makes the desktop background actually draw when there is a fullscreen surface and we go to exposay.
2014-01-07exposay: fix infinite loop with fullscreen surfacesEmilio Pozuelo Monfort1-2/+5
We were calling exposay_highlight_surface() inside a wl_list_for_each loop for a layer, but exposay_highlight_surface() calls activate() which calls shell_surface_update_layer(), which removes the surface from its layer and reinserts it, causing an infinite loop. Call exposay_highlight_surface() outside the for_each to avoid this. https://bugs.freedesktop.org/show_bug.cgi?id=72404
2014-01-07keyboard: Handle touch up eventKristian Høgsberg3-9/+46
This fixes arrow keys which trigger on button up. Closes: https://bugs.freedesktop.org/show_bug.cgi?id=73169
2014-01-07editor: Add missing touch-to-activate for the entriesKristian Høgsberg1-0/+41
Closes: https://bugs.freedesktop.org/show_bug.cgi?id=72996
2014-01-03clients: Fix libexec clients installArmin K1-1/+1
2014-01-02shell: Only assign focus on touch if there is a touch focus surfaceKristian Høgsberg1-0/+2
Similar to 7c4f6cc145daf66cd9624f1e70dd5278241f5858, if we don't have a background image from the desktop-shell client or the touch point for some other reason doesn't hit a surface we trigger a segfault as we try to deref the seat->touch->focus NULL pointer. For touch, another problem could be fudgey calibration that ends up giving touch coordinates outside the output space. https://bugs.freedesktop.org/show_bug.cgi?id=72839
2014-01-02xwm: Handle WM_TRANSIENT_FORKristian Høgsberg2-7/+14
Set up X windows that are transient for another window as transient surfaces in shell.c. This keeps the transient windows on top of their parent as windows are raised, lowered for fullscreened. https://bugs.freedesktop.org/show_bug.cgi?id=69443
2014-01-02build: fix commit that changed option for installing clientRicardo Vieira1-3/+3
Without this patch the option --enable-demo-clients-install does not install the client demos.
2014-01-02Properly free drm plane during creation of spritesChris Michael1-1/+1
If we fail to allocate space for a new drm_sprite, then we should properly call drmModeFreePlane (not free) to release the drm plane. Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-01-02shell: Start the input panel slide slightly on the outputKristian Høgsberg1-2/+2
If a surface is not on any output, scheduling a repaint for it is a no-op. weston_view_schedule_repaint() schedules repaints for all outputs that overlap with the surface extents, but if the surface is completely outside all outputs nothing will be scheduled. Fix this for now by starting the slide slightly into the output.
2014-01-02shell: Test for surface->width == 0 to see if input-panel was unmappedKristian Høgsberg1-1/+1
The input-panel codes tries to see determine if a buffer has not yet been attached (or a NULL buffer has been attached), and doesn't map the input panel surface yet in that case. However, it test for buffer_ref being NULL, which can happen for other reasons. The right test is to see if surface->width is 0, which means that either a buffer hasn't yet been attached or a NULL buffer has been attached. https://bugs.freedesktop.org/show_bug.cgi?id=72519
2014-01-02shell: Always set input-panel position on initial configureKristian Høgsberg1-9/+1
If we're not currently showing the input panels, we still need to set the panel position so that it's set when we later need to show them. This fixes the initial flicker of the input panel in the wrong position when we first show it.
2014-01-01editor: Add keyboard_focus handler to schedule repaintKristian Høgsberg1-0/+12
This let the editor client repaint the frame to indicate it's active when it receives keyboard focus.
2014-01-01shell.c: Set state_changed for xwayland surfaces as wellKristian Høgsberg1-0/+1
Fixes the problem where xwayland surfaces pop up at 0,0 always.
2014-01-01tests: Only run buffer-count test if we have at least mesa 10Kristian Høgsberg3-0/+30
https://bugs.freedesktop.org/show_bug.cgi?id=72835
2014-01-01desktop-shell: Remove debug code from previous commitKristian Høgsberg1-1/+1
2014-01-01shell: Only assign focus on click if there is a pointer focus surfaceKristian Høgsberg2-1/+3
If we don't have a background image from the desktop-shell client or the pointer for some other reason doesn't have a focus we trigger a segfault as we try to deref the seat->pointer->focus NULL pointer. https://bugs.freedesktop.org/show_bug.cgi?id=73066
2014-01-01shell.c: Back out alt-tab functionalityKristian Høgsberg1-251/+0
This is still fairly unstable, causes lockups with fullscreen and exposay, leaves small preview surfaces on-screen if used on the same modifier as mod-tab. We also only need on mod-tab implementation so lets see if we can consolidate the current and this alt-tab implementation in 1.5. https://bugs.freedesktop.org/show_bug.cgi?id=72610
2014-01-01Fix the size of surfaces created in create_black_surfaceJason Ekstrand1-1/+1
Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
2014-01-01build: Move clients libexec_PROGRAMS under BUILD_CLIENTS conditionalKristian Høgsberg3-15/+12
All the libexec programs are only built when BUILD_CLIENTS is true, so we can just assign libexec_PROGRAMS under the condition. This lets us drop most of the variable assignments and simplify it a bit. https://bugs.freedesktop.org/show_bug.cgi?id=72812
2014-01-01build: Don't try to build weston-info if client build is disabledKristian Høgsberg1-4/+2
The weston-info sources are defined conditionally in the if BUILD_CLIENTS section, but we always added weston-info to bin_PROGRAMS. https://bugs.freedesktop.org/show_bug.cgi?id=72812
2014-01-01build: Rename option and conditional for installing demo clientsKristian Høgsberg2-7/+7
Previously the option was --enable-demo-clients and the conditional was ENABLE_DEMO_CLIENTS. They control whether or not we install the demo clients (ie all other clients than weston-terminal and weston-info). Rename the option and the conditional to better reflect this.
2014-01-01shell: Fix up previous broken commitKristian Høgsberg1-4/+3
2014-01-01Revert "shell: Change stacking order calculation for popup surfaces"Kristian Høgsberg1-29/+4
Popup windows are relative to a plain wl_surface, so that custom surfaces can have popups. This used for the desktop-shell panel for example. Also, popups should be immediately on top of their parent surface, as they typically represent an extension of an UI element in the parent surface such as a combo box or menu. This reverts commit da704d97faef87520c5b055e4b5c8d1f6c8fc1be. Conflicts: desktop-shell/shell.c https://bugs.freedesktop.org/show_bug.cgi?id=72547
2013-12-31window.c: Don't put buttons on frames for custom windowsKristian Høgsberg1-1/+8
Custom windows don't have a wl_shell_surface and can't do anything in response to these button (except crash). This only affects the unlock dialog. https://bugs.freedesktop.org/show_bug.cgi?id=72542
2013-12-31shell: Set state_changed when we make a surface transientKristian Høgsberg1-0/+1
If we don't mark the state as changed, we don't copy over next_state to state and we fail to treat the surface as a transient. In particular, we give it a random intial position instead of mapping it at the given parent relative position. https://bugs.freedesktop.org/show_bug.cgi?id=72532
2013-12-22Release pointer and keyboard with the seatHardening1-1/+4
This patch fixes seat releasing during a RDP disconnection. It does not fully fix https://bugs.freedesktop.org/show_bug.cgi?id=66830, but makes things better.
2013-12-22shell: Handle the desktop shell client destroy signalAnder Conselvan de Oliveira2-0/+17
Set the internal pointer for the client to NULL. This fixes a segmentation fault at shutdown, where the shell would hang up before and cause libwayland to call wl_client_destroy(). When the shell was destroyed later, another call to wl_client_destroy() would cause the crash. https://bugs.freedesktop.org/show_bug.cgi?id=72550
2013-12-22compositor: Destroy renderer in weston_compositor_shutdown()Ander Conselvan de Oliveira8-13/+3
Currently we destroy the renderer before the outputs are destroyed, but that sometimes leads to an error since a reference to the renderer is necessary in order to destroy a gl_renderer_output. Since destroying the renderer is common among all backends, just move that call into weston_compositor_shutdown() immediately after the outputs being destroyed.
2013-12-22pixman: Destroy pixman images when underlying buffer is destroyedLubomir Rintel1-1/+31
While the pixman image might be attached, the underlying buffer might be already gone under certain circumstances. This is easily reproduced by attempting to resize gnome-terminal on a fbdev backend. $ WAYLAND_DEBUG=1 strace -emunmap weston --backend=fbdev-backend.so ... [1524826.942] wl_shm@7.create_pool(new id wl_shm_pool@23, fd 40, 1563540) [1524827.315] wl_shm_pool@23.create_buffer(new id wl_buffer@24, 0, 759, 515, 3036, 0) ... [1524829.488] wl_surface@14.attach(wl_buffer@24, 0, 0) [1524829.766] wl_surface@14.set_buffer_scale(1) [1524829.904] wl_surface@14.damage(0, 0, 759, 515) [1524830.248] wl_surface@14.frame(new id wl_callback@25) [1524830.450] wl_surface@14.commit() ... [1524846.706] wl_shm@7.create_pool(new id wl_shm_pool@26, fd 40, 1545000) [1524847.215] wl_shm_pool@26.create_buffer(new id wl_buffer@27, 0, 750, 515, 3000, 0) [1524847.735] wl_buffer@24.destroy() [1524847.953] -> wl_display@1.delete_id(24) [1524848.144] wl_shm_pool@23.destroy() munmap(0xb5b2e000, 1563540) = 0 [1524849.021] -> wl_display@1.delete_id(23) [1524849.425] wl_surface@14.attach(wl_buffer@27, 0, 0) [1524849.730] wl_surface@14.set_buffer_scale(1) [1524849.821] wl_surface@14.damage(0, 0, 750, 515) <No commit yet, so drawing is attempted from older buffer that used to be attached to the surface, which happens to come from a destroyed pool, resulting it an invalid read from address 0xb5b2e000> Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
2013-12-19compositor: Clean up view output move and destroy listenersAnder Conselvan de Oliveira1-0/+6
Remove those listeners when the output is destroyed, otherwise they'll point to invalid data that may lead to corruption when assigning a new output for the view. -- This is possibly related to bug 72845. I didn't have enough equipment to try and reproduce it. https://bugs.freedesktop.org/show_bug.cgi?id=72845
2013-12-19compositor-x11: Set the name field on weston_outputsAnder Conselvan de Oliveira1-0/+4
That way log messages referencing the output are more informative.
2013-12-19screenshooter: Choose output to record from based on keyboard focusAnder Conselvan de Oliveira1-67/+29
Record from the output of the surface that has keyboard focus for the seat used to activate the recorder key binding. If there is no focused surface, record from the first one. Also, use the weston_transformed_region() to transform the damage region of the output into the coordinates expected by read_pixels(). https://bugs.freedesktop.org/show_bug.cgi?id=71401
2013-12-17compositor: Initialize output listener linksKristian Høgsberg1-0/+2
Make sure the links are initialized so we can safely remove the listeners in weston_view_unmap(). https://bugs.freedesktop.org/show_bug.cgi?id=72808
2013-12-17screenshooter: Record one extra frame when recording stopsAnder Conselvan de Oliveira1-2/+10
If the compositor hasn't been rendering for a while when the recording stops, the time difference between the last rendered frame and that moment won't be in the encoded video. Fix that by forcing one extra frame to be recorded when the user presses the recorder key binding. https://bugs.freedesktop.org/show_bug.cgi?id=71142
2013-12-17nested: Add EGL_WL_create_wayland_buffer_from_image compat definesKristian Høgsberg1-0/+10
Make it possible to compile this example with EGL implementations without this extension.
2013-12-16configure.ac: Bump version to 1.3.91 for alpha releaseKristian Høgsberg1-1/+1
2013-12-16Makefile.am: Clean generated weston.ini on make cleanKristian Høgsberg1-0/+2
2013-12-16clients: add scaler test appJonny Lamb3-0/+226
This client tests the wl_scaler and wl_surface_scaler protocol extensions by cropping and then scaling a surface to ensure it is rendered correctly. More details in comments in the code.
2013-12-16pixman-renderer: implement surface scaling and croppingJonny Lamb1-6/+24
The pixman renderer doesn't use the weston_surface_to_buffer* functions to alter coordinates depending on buffer transformation, buffer scaling, and surface scaler (wl_surface_scaler). pixman_transform_scale() is used instead to perform said transformations without having to modify each coordinate.
2013-12-16compositor: transform surface coordinates if a surface scaler is usedJonny Lamb2-8/+89
Implements wl_surface_scaler.set by setting desired src_{x,y,width,height} and dst_{width,height} values in the weston_buffer_viewport struct, then altering coordinates in weston_surface_to_buffer* functions if there is a scaler set for said surface.
2013-12-16compositor: add stub scaler resourcesJonny Lamb3-0/+109
This registers the wl_scaler global object and lets clients create wl_surface_scaler objects for surfaces. wl_surface_scaler.set is not implemented so this doesn't really do anything useful yet.
2013-12-16protocol: crop & scale RFC v3Pekka Paalanen2-1/+158
Add cropping and scaling to wl_surface. Add a global factory interface wl_scaler, which creates wl_scaler_surface objects tied to a given wl_surface. The wl_scaler_surface object can be used to set a cropping and scaling transformation to change how a wl_buffer maps to wl_surface contents. Changes in v2: Take into account buffer_transform and buffer_scale, and try to explain more clearly how the coordinate transformations work and what their order is. Add, that crop and scale state is double-buffered. Explain missing dst_x, dst_y. Clarify that undefined content still is some content, but NULL buffer implies no content nor size. Changes in v3: Disallow zero values for dst_width and dst_height. Open issues: Should this be a separate interface like here, or just a wl_surface request? If we keep this as a separate interface, rename wl_surface_scaler to wl_viewport.
2013-12-16Add a weston_surface_set_size functionJason Ekstrand3-10/+18
Surfaces that are created by clients get their size automatically updated by the attach/commit. Surfaces created directly by shells (such as black surfaces) sometimes need to be manually resized. This function allows you to do that while being somewhat less messy than messing with the internals of weston_surface manually. Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
2013-12-16shell: Reset fullscreen and maximized state on output unplugAnder Conselvan de Oliveira1-0/+3
When a view is moved to another output because its current output was unplugged, remove the fullscreen and maximized state.
2013-12-16desktop-shell: Invalidate saved position when output is destroyedZhang, Xiong Y3-5/+36
If the saved position for a fullscreen or maximized output view is in an output that has been unplugged, the coordinates don't make sense anymore. In that case, invalidate them and use the initial position algorithm when changing them back to the basic state. Signed-off-by: Zhang, Xiong Y <xiong.y.zhang@intel.com> Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
2013-12-16compositor: Make pointers visible when an output is unpluggedAnder Conselvan de Oliveira3-12/+81
Previously, if a pointer was inside an output that was unplugged, it could potentialy end up outside any valid output forever. With this patch, the pointer is moved to the "closest" output to the pointer.
2013-12-16compositor: Don't repaint outputs being destroyedAnder Conselvan de Oliveira2-0/+6
Set a flag when an output is being destroyed and use that to avoid repainting. This allows functions that schedule an output repaint to be called when the output is being destroyed without causing the compositor to crash.
2013-12-16compositor: Ensure views are visible if their output was unpluggedZhang, Xiong Y2-2/+58
Use the output destroy signal to move the views in the event the output was unplugged. Signed-off-by: Zhang, Xiong Y <xiong.y.zhang@intel.com> Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
2013-12-16compositor: Move views when outputs are movedZhang, Xiong Y2-3/+75
Previously, when an output was moved due to another output being unplugged, the views on the first output would remain in the same position. This patch adds an output_move signal that the views listen too in order to repostion themselves in the event of an unplug. Signed-off-by: Zhang, Xiong Y <xiong.y.zhang@intel.com> Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>