Commit Graph

1333 Commits

Author SHA1 Message Date
Kristian Høgsberg
a018fb0dbf compositor-drm: Exit if we failed to get drm master
We can do anything without drm master.  Also log an error in case we
fail to drop it, which will be trouble for whoever we're switching to.
2012-01-16 10:53:01 -05:00
Kristian Høgsberg
5743010af0 xserver: Create WM window, handle client messages 2012-01-15 22:16:11 -05:00
Olivier Le Thanh Duong
643eac56e7 evdev: Correct warning on missing input device 2012-01-15 16:20:49 -05:00
Kristian Høgsberg
de13448c92 xserver: Just dup fd instead of two fcntls to get a non-O_CLOEXEC fd
Yeah, it's the same number of lines of code, but this actually checks
the error return.
2012-01-15 16:05:43 -05:00
Kristian Høgsberg
1760ebb236 xserver: Set DISPLAY for clients launched by the compositor 2012-01-15 16:04:33 -05:00
Kristian Høgsberg
ea093d4883 xserver: Don't set -logfile option, only available to root user 2012-01-15 15:51:12 -05:00
Kristian Høgsberg
92734c5673 tty: Leave tty in KD_GRAPHICS mode during vt switches
Part of the point of KD_GRAPHICS mode is that the kernel doesn't try
to restore the VT contents when we switch bach, but leaves that
to the user mode process.  This avoids ugly flicker of text mode contents
before the compositor takes over.
2012-01-15 15:25:06 -05:00
Kristian Høgsberg
c5b9ddb610 compositor-drm: Fail, and fail early if we can't set up the tty
Typically a permissions problem.  Weston should be setuid root or
be launched by a setuid helper.
2012-01-15 15:25:05 -05:00
Kristian Høgsberg
00513ab7cc tty: Close tty fd on exit 2012-01-15 15:25:05 -05:00
Kristian Høgsberg
1201b75bec tty: If no tty option is given, use stdin and make sure it's a vt 2012-01-15 15:25:01 -05:00
Kristian Høgsberg
8e81df4503 Use new format codes 2012-01-11 14:24:46 -05:00
Kristian Høgsberg
249713bbe0 Remove redundant glTexImage2D() call
When we later upload the cursor image with glTexImage2D(), that will unbind
the image just fine.  No need for a NULL upload.  Except that that doesn't
currently happen with mesa drivers, but the NULL upload is redundant either
way.
2012-01-06 15:24:59 -05:00
Kristian Høgsberg
c5e2376d3f compositor: Damage below before attaching new buffer 2012-01-06 14:37:19 -05:00
Kristian Høgsberg
b3cca0a411 shell: Start implementing the popup surface type
This lands the basic behavior of the popup surface type, but there are still
a number of details to be worked out.  Mainly there's a hardcoded timeout
to handle the case of releasing the popup button outside any of the
client windows, which triggers popup_end if it happens after the timeout.
Maybe we just need to add that as an argument, or we could add a new event
that fires in this case to let the client decide whether it ends the popup
or not.
2012-01-06 11:41:55 -05:00
Kristian Høgsberg
dade64968c Move wl_data_device implementation to wayland-server 2012-01-06 11:28:53 -05:00
Kristian Høgsberg
faf1fee64f Move default grab implementation to wayland-server 2012-01-05 11:00:01 -05:00
Kristian Høgsberg
9ddb826077 Use new grab api 2012-01-05 11:00:01 -05:00
Rob Bradford
0b17b8ec01 compositor: Don't try and destroy old pointer surface if it empty
If attach was called on wl_input_device with a nil buffer twice then the
second call would cause a segfault.
2012-01-05 10:59:44 -05:00
Pekka Paalanen
b07876d23a evdev: warn about missing input devices
Usually there should be at least one input device, when Weston starts
up, or is reactivated by a VT switch. Add a nice warning, in case there
are no input devices.

This is to give a clue to users who happen to try Weston on DRM, and
do not get any response.

Add also a message to another failure case, that may lead to missing
input devices.

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2012-01-05 16:50:00 +02:00
Pekka Paalanen
c0444e3ad6 compositor: force fade-in on start
Weston initialises to faded-out state, which means all outputs are just
black, even if they render fine.

Previously the fade-in was triggered probably by some random input
event, since Weston was not guaranteed to wake up. Especially with the
drm backend, and the usual problem of not having permissions to input
devices, Weston would not fade in at all and appear broken.

Force Weston to fade in right after initialisation. This show that at
least rendering works, if it does not respond to any input.

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2012-01-05 16:49:54 +02:00
Pekka Paalanen
61b5c67268 shell: free memory on move/resize error paths
Memory leaks noticed by Valgrind, when wl_input_device_update_grab()
fails.

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2012-01-05 09:10:49 +02:00
Kristian Høgsberg
8600040236 compositor-x11: Just a few more weston renames 2012-01-03 23:24:14 -05:00
Kristian Høgsberg
e7126ef537 x11: Dont claim the X11 selection when we set the proxy Wayland selection 2012-01-03 23:01:47 -05:00
Kristian Høgsberg
a33d0c38d2 data-device: Use a listener list to decouple the x11 selection bridge 2012-01-03 23:01:47 -05:00
Kristian Høgsberg
f9b0844e59 x11: Initialize wm->incr when converting the TARGETS target 2012-01-03 23:01:47 -05:00
Kristian Høgsberg
300deba3be x11: Handle non-existing properties correctly
Don't try to read out ATOM or WINDOW values if there is no such property.
2012-01-03 23:01:40 -05:00
Kristian Høgsberg
db9bf1e818 data-device: Fix a few bugs in the commit to drop ref-counting
Did not test that change.
2012-01-03 22:43:36 -05:00
Kristian Høgsberg
9724b51750 More weston rename fixes 2012-01-03 14:35:49 -05:00
Kristian Høgsberg
82d9ee929b data-device: Handle source going away instead of ref-counting it
We have to deal with the data source going away.  Even if we have a
reference to the server side data source, we can't do anything if the
client that provided the source went away.  So just NULL the offers
source pointer in the destroy callback for the source.
2012-01-03 14:11:18 -05:00
Kristian Høgsberg
cb78447a0e Fix a few missing wlsc->weston renames 2012-01-03 11:40:25 -05:00
Kristian Høgsberg
3466bc8042 Merge remote-tracking branch 'pq/compositor-dtors-v1'
This collided with the big weston rename, but git did a good job of fixing
most cases.

Conflicts:
	compositor/compositor.h
	src/compositor-x11.c
	src/compositor.c
	src/screenshooter.c
	src/util.c
2012-01-03 11:36:37 -05:00
Kristian Høgsberg
f6a5f7def3 Fix distcheck 2012-01-03 11:04:09 -05:00
Kristian Høgsberg
8334bc1ef9 Rename wayland-compositor to weston
This rename addresses a few problems around the split between core
Wayland and the wayland-demos repository.

1) Initially, we had one big repository with protocol code, sample
compositor and sample clients.  We split that repository to make it
possible to implement the protocol without pulling in the sample/demo
code.  At this point, the compositor is more than just a "demo" and
wayland-demos doesn't send the right message.  The sample compositor
is a useful, self-contained project in it's own right, and we want to
move away from the "demos" label.

2) Another problem is that the wayland-demos compositor is often
called "the wayland compsitor", but it's really just one possible
compositor.  Existing X11 compositors are expected to add Wayland
support and then gradually phase out/modularize the X11 support, for
example.  Conversely, it's hard to talk about the wayland-demos
compositor specifically as opposed to, eg, the wayland protocol or a
wayland compositor in general.

We are also renaming the repo to weston, and the compositor
subdirectory to src/, to emphasize that the main "output" is the
compositor.
2012-01-03 11:04:04 -05:00