Commit Graph

2098 Commits

Author SHA1 Message Date
Scott Moreau
2327d1f490 wcap: Fix typo in usage output. 2012-07-23 14:25:14 -04:00
Kristian Høgsberg
f32f096cd8 wcap: Clarify help message, don't dump yuv4mpeg2 to terminal 2012-07-23 11:10:20 -04:00
Scott Moreau
ec116022ec desktop-shell: Declare grab_cursor as enum cursor_type. 2012-07-23 10:48:45 -04:00
Kristian Høgsberg
776a563702 wcap: Add GCC_CFLAGS and fix more compiler warnings 2012-07-23 10:47:34 -04:00
Scott Moreau
005d8cd9f7 wcap: Declare variable with same sign as convert_to_yv12() expects. 2012-07-23 10:42:04 -04:00
Kristian Høgsberg
0e696478a9 Handle new transform argument in wl_output.geometry event 2012-07-22 15:49:57 -04:00
Kristian Høgsberg
c4063f310a xwm: Make override-redirect windows opaque 2012-07-22 15:32:45 -04:00
Tiago Vignatti
ce1baa8097 xwm: use last focused window for guessing transient parent
On X the global absolute coordinates are sent in ConfigureNotify and transient
windows are mapped exactly on that position. On Wayland we don't have the
concept of global coordinates, and that's a problem for transient surfaces
without transient_for set because they rely on such hint for setting their
positioning.

So this solution is a workaround. It guesses a parent based on the last
focused window to determine the relative position of the transient surface.
This put transient windows of Chrome browser back to work.

Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
2012-07-22 14:35:25 -04:00
Tiago Vignatti
e66fcee435 xwm: Fix transient positioning
Commit eaee7841 took out the configure positioning of windows. This patch
brings it back and addresses also logic for resizing and sub-menus, that was
not covered on that commit.

Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
2012-07-22 14:28:35 -04:00
Tiago Vignatti
2ea74d9f71 xwm: Initialize window decoration always as !override
Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
2012-07-22 14:26:49 -04:00
Scott Moreau
b67ea54a3f weston.ini: Move binding-modifier to shell section.
The variable has no effect as part of the screensaver section.
2012-07-22 14:24:42 -04:00
Philipp Brüschweiler
f25602bdc0 Extract the text_model_manager interface from input_method
This is necessary because all clients need a way to create
text_models, but only one client at a time can be bound to
the input_method global (else we don't know to whom we are
supposed to send events).
2012-07-22 12:06:10 -04:00
Kristian Høgsberg
f97f379dfc text-backend.c: Whitespace fixes
Use a temp variable to break a couple of long lines, break a few long
lines.
2012-07-22 11:51:42 -04:00
Philipp Brüschweiler
1746781385 text-backend: minor fixes
* make sure deactivation is done consistently when a text_model
  is destroyed
* zero out allocated objects
2012-07-22 11:49:18 -04:00
Philipp Brüschweiler
591cfca4e8 editor: deactivate old text model before activating the new one 2012-07-22 11:47:31 -04:00
Kristian Høgsberg
1e51fecdf5 compositor: Destroy pending surface callbacks when destroying surface
Reported by Dima Ryazanov <dima@gmail.com> in
<1341937691-26234-1-git-send-email-dima@gmail.com> but we also need to
destroy callbacks when the surface is destroyed normally.
2012-07-22 11:34:19 -04:00
Kristian Høgsberg
8d25a5a633 configure.ac: Don't require vpx now that we don't build the webm encoder 2012-07-20 18:05:10 -04:00
Tiago Vignatti
65191d144f shell: Remove unused pointer_end_grab
shell_grab_end already does that for us.

Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
2012-07-20 15:31:52 -04:00
Tiago Vignatti
9134b77f2c xwm: Don't try to change frame cursor when there's no decoration
It was causing some artifacts on chrome.

Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
2012-07-20 15:31:00 -04:00
Kristian Høgsberg
a08b528597 shell: Center fullscreen surface whenever new buffer is attached 2012-07-20 15:31:00 -04:00
Kristian Høgsberg
72e023cf50 Flesh out README a bit, link to building instructions 2012-07-20 12:26:23 -04:00
Kristian Høgsberg
d3a1965a3d clients: Implement minimum size for toy toolkit clients
We default to setting the minimum size to the initial size.  To set a
different minimum size than the initial size, set the minimum size first
then then initial size.  Good enough for a toy toolkit.

https://bugs.freedesktop.org/show_bug.cgi?id=50263
2012-07-20 11:33:02 -04:00
Kristian Høgsberg
905d7cedf5 compositor: Update to use new tokens for EGL_WL_bind_wayland_display 2012-07-19 14:20:20 -04:00
Kristian Høgsberg
71375066a4 Never install weston setuid
We don't support this anymore.  weston requires a setuid helper (such as
weston-launch) to run under kms, and should never run as root itself.

Disabe the setuid warning in configure.ac since we now only install the
minimal weston-launch as setuid.
2012-07-19 14:17:58 -04:00
Kristian Høgsberg
82a1d11cfa shell: Set shell_interface.shell at initialization 2012-07-19 14:02:49 -04:00
Kristian Høgsberg
70a11b131d compositor-drm: Remove cursor debug message 2012-07-18 17:23:41 -04:00
Kristian Høgsberg
1f5de35482 compositor-drm: Only update hw cursor contents when it changes
We avoid the memcpy, gbm_bo_write and the drmModeSetCursor ioctl per frame.
2012-07-18 15:52:14 -04:00
Kristian Høgsberg
24e4275c30 compositor-drm: Only call drmModeMoveCursor() if hw cursor position changed
Saves an ioctl per frame.
2012-07-18 15:52:14 -04:00
Kristian Høgsberg
f1ea63ff05 compositor: Don't record surface damage when we move or transform surfaces
surface->damage is for when the contents of the surface changes.  Instead,
use weston_surface_damage_below() to repaint the damaged area.  We avoid
unecessary uploading shm and hw cursor contents this way.
2012-07-18 15:52:14 -04:00
Kristian Høgsberg
c12efd0aa7 wcap: Just make wcap-decode dump YUV4MPEG2
Instead of having a custom fork of the vpxenc tool in weston, we can
just dump raw YUV data in the YUV4MPEG2 format and feed that into the
upstream vpxenc.  This also works with theora_encoder and probably many
other encoders.
2012-07-18 15:52:13 -04:00
Kristian Høgsberg
94de680439 shell: Default to maximize/fullscreen on current output 2012-07-18 15:52:13 -04:00
Kristian Høgsberg
971cbc8c9e compositor: Free the right EGLImage
We forgot to index the image array and freed image[0] multiple times
2012-07-17 14:21:25 -04:00
Kristian Høgsberg
4901f6ceea compositor-drm: Allocate hw cursor like other planes
We no longer reserve the hw cursor for just the pointer sprite.  Any
surface that satisfies the requirements for the hw cursor can be used.

Of course that's more or less always the pointer sprite, but at least now
we don't hard-code the references to compositor->seat anymore.
2012-07-16 16:44:24 -04:00
Kristian Høgsberg
a6edab3e23 compositor-drm: Combine drm_output_set_cursor and weston_output_set_cursor
weston_output_set_cursor was the left-over of a core compositor cursor
helper that we moved into compositor-drm.c.
2012-07-16 16:44:24 -04:00
Kristian Høgsberg
6143f7dfbd compositor-drm: Assign primary framebuffer in assign_planes callout
Determining whether it was possible to use a surface buffer as the
primary framebuffer was always a bit of a hack.  Just before rendering,
we look at the second top-most surface to see if it's the right size and
position and then use it if it is.  If we have a hw cursor and a drm
plane on top, it's no longer the second top-most and it wouldn't be picked
even if it could work.

With this change, we inspect surfaces in drm_assign_planes and try to find
a candidate for the primary fb there.  We track the overlap like for
overlays and if there is a surface that's not overlapped and fills the
output we pick it.

This commit also consolidate the logic to track damage as we move a surface
in and out of the primary plane, which was missing in the drm plane case.
2012-07-16 16:44:23 -04:00
Kristian Høgsberg
3b00bae996 compositor-drm: Support hardware scaling with drm planes
The kms planes support scaling, so try to detect transformations that
are just translations + scaling and program the kms plane accordingly.

In particular, this lets us fullscreen a yuv surfaces with the scale method
and have the compositor use a kms plane for scaling and color conversion.
2012-07-16 16:44:23 -04:00
Kristian Høgsberg
270a7cb02d compositor-drm: Follow gbm_bo_get_pitch rename to gbm_bo_get_stride
It was always a confusing mis-nomer, fix it while we can.
2012-07-16 16:44:16 -04:00
Kristian Høgsberg
2763a2e94e compositor-drm: Use gbm_bo_import instead of gbm_bo_create_from_egl_surface
This lets us create the gbm bo from the wl_buffer instead of the
EGLImage.  With planar buffer, the EGLImage corresponds to a plane
and not the entire planar buffer.

More importantly, with some YUV formats (packed YUYV and similar) we use
several EGLImages to sample the different components, but KMS only
want one plane in that case.
2012-07-16 16:40:29 -04:00
Tiago Vignatti
c190323c90 xwm: set the root window pointer to left_ptr
More pretty and also consistent with toytoolkit.

Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
2012-07-16 13:35:27 -04:00
Tiago Vignatti
236b48d414 xwm: set appropriate cursors for the frame window
Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
2012-07-16 13:35:27 -04:00
Tiago Vignatti
90fada4338 xwayland: add simple xcb-cursor hook based on libXcursor
It's in fact based on the core of libXcursor, which doesn't bring any Xlib
dependency.

Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
2012-07-16 13:35:27 -04:00
Kristian Høgsberg
e89cef37eb xwayland: Look up 32 depth rgba render format as well 2012-07-16 13:35:27 -04:00
Kristian Høgsberg
e6d8d2f62a xwayland: Use the right length for iterating through the formats array
Spotted by Tiago Vignatti, minimal fix to just use the right length.
2012-07-16 13:35:26 -04:00
Ander Conselvan de Oliveira
07a91cd9fd desktop-shell: Don't get a shell surface for the grab surface
The grab surface does not depend on any of the shell surface
functionality, so don't allocated one.
2012-07-16 13:35:26 -04:00
Ander Conselvan de Oliveira
ddca49600f window: Workaround a stuck frame callback on the cursor surface
It is possible that a client loses the focus between receiving a
pointer.enter event and sending a pointer.set_cursor request. In that
case, the cursor surface might not be mapped and the frame callback
requested on it will never trigger.

Work around this by trying to remap the cursor surface whenever there
is a frame callback and the serial for the enter event is higher than
the cursor serial.
2012-07-16 13:35:25 -04:00
Ander Conselvan de Oliveira
eac9a46012 shell: Don't ping the grab surface
If the grab surface happens to be unresponsive, the busy cursor grab
will be started and that will cause the grab surface to receive focus,
which in turn leads to it being pingged again. Break the cycle by not
sending pings to it. If the shell is unresponsive it won't be able to
set the busy cursor anyway.
2012-07-16 13:35:25 -04:00
Kristian Høgsberg
c7814d2e98 compositor: Don't send wl_surface.enter/leave if we didn't find a resource 2012-07-12 12:34:43 -04:00
Kristian Høgsberg
240dfeb0fe shell: Scale fullscreen surface without cropping them, center on output 2012-07-12 12:32:31 -04:00
Scott Moreau
fe89f07e33 toytoolkit: Remove obsolete function window_set_custom(). 2012-07-12 09:18:49 -04:00
Scott Moreau
a6e24d3104 wscreensaver: Fix --demo mode. 2012-07-12 09:18:45 -04:00