Commit Graph

1418 Commits

Author SHA1 Message Date
Kristian Høgsberg
2d57439592 clients: Allow compiling with the cairo glesv2 backend
This disables gears and wscreensaver, which use full GL.
2012-01-18 14:50:58 -05:00
Pekka Paalanen
40e49ac7b5 desktop-shell: fix the unlock dialog decorations
The decorations were not responding, could not move or resize the
dialog, and it painted with a black shade.

When the dialog is created, schedule a resize instead of a repaint. The
resize will initialise the widget tree, and let everything draw and work
as it should.

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2012-01-18 13:09:56 -05:00
Kristian Høgsberg
08fcbf0f3d tty: Use SIGUSR1 for both enter and leave signals
Now that we track has_vt, we can use the same handler for both enter and leave.
2012-01-18 12:42:16 -05:00
Kristian Høgsberg
62d2774956 tty: Switch back to launch tty if we switched away 2012-01-18 12:38:33 -05:00
Kristian Høgsberg
34f80ff813 drm: Cancel any scheduled repaints in the leave vt handler
If we don't cancel the repaint, we end up pointlessly redrawing the output.
What's worse is that pageflipping to the new buffer eventually fails and
we miss the finish_frame callback, leaving the compositor stuck when we
re-enter the vt.
2012-01-18 11:50:31 -05:00
Kristian Høgsberg
835cd49772 drm: Reset kms mode on vt enter
Normally the repaint will trigger a pageflip, which flips back to our
fb, but that doesn't work if the kms output has been turned off or
set to a different mode.
2012-01-18 11:48:46 -05:00
Kristian Høgsberg
54f14c3c3e drm: Complain if pageflip fails
We still don't handle the error in any way, but there's not much we can do.
It's typically a case of not having drm master."
2012-01-18 11:47:41 -05:00
Kristian Høgsberg
f03a616c21 shell: Set desktop-shell deathstamp at initial launch
Timestamp 0 is a valid timestamp and we can't use that as an uninitialized
timestamp.
2012-01-17 11:07:42 -05:00
Pekka Paalanen
57cd0ed916 wscreensaver: get decorations back
In the great toytoolkit widget revolution, wscreensaver demo mode lost
its window decorations. Bring them back.

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2012-01-17 10:59:29 -05:00
Pekka Paalanen
4d733ee246 shell: respawn desktop-shell if it dies
If the desktop-shell client goes away for any reason, respawn it. To
avoid harmful looping, limit the respawning to 5 times within 30
seconds, and then give up.

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2012-01-17 10:58:52 -05:00
Kristian Høgsberg
39d908e63a tty: Open a new vt if not running on a VT
This is typically when launcing from a pty such as an X (or Wayland)
terminal or from an ssh session.  Opening a new vt typically requires root
priviledges, so weston must be setuid root or laucnhed as root for this
to work.
2012-01-16 22:44:34 -05:00
Pekka Paalanen
0bd892750d window: remove duplicate widget_resize_handler_t
Fixes the following build failure:

In file included from window.c:58:0:
window.h:194:16: error: redefinition of typedef 'widget_resize_handler_t'
window.h:178:16: note: previous declaration of 'widget_resize_handler_t' was here

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2012-01-16 21:02:43 -05:00
Kristian Høgsberg
0690da60d4 compositor: Install a SEGV handler to try and clean up the VT if we crash 2012-01-16 11:54:30 -05:00
Kristian Høgsberg
353e57f908 tty: Fix order of VT ack/release ioctls and the vt handler
We can only set up once we've acquired the VT and we shouldn't release the
VT until we've cleaned up.  Before we would release the VT first, and then
race to drop drm master as X tried to get drm master.  Which would kill X.
2012-01-16 10:57:14 -05:00
Kristian Høgsberg
23a47a80e2 evdev: Drop noisy debug messages on vt swtich 2012-01-16 10:54:07 -05:00
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
Richard Hughes
2f6219f127 Explicitly add GIO to the client libs
This prevents a build warning on Fedora 16 of:
   undefined reference to symbol 'g_file_get_basename'
2012-01-13 13:01:25 -05:00
Kristian Høgsberg
ab5dacdac8 view: Make view compile again 2012-01-12 10:48:51 -05:00
Kristian Høgsberg
8e81df4503 Use new format codes 2012-01-11 14:24:46 -05:00
Kristian Høgsberg
62444800e1 window: Don't deref focus widget if there isn't one 2012-01-11 11:18:14 -05:00
Kristian Høgsberg
f0993f61c0 window: Remove a few unused struct fields 2012-01-11 00:09:42 -05:00
Kristian Høgsberg
b63235142d window: Move focus widget to struct input 2012-01-11 00:04:42 -05:00
Kristian Høgsberg
831dd52aa0 window: Implement input device grabbing
With all input events going to widgets now, we can grab an input device
to a widget, so that all events are delivered to that widgets handlers.
This lets us implement the last bit of the menu behaviour, that is
the client side grabbing of events.  The result is that we can now pop down
the menu when we receive clicks in the clients own windows and we
don't send motion and button events to other widgets.
2012-01-10 23:46:33 -05:00
Kristian Høgsberg
29af3ebce6 window: Make decorations just a widget
Woohoo, only took 25 commits of refactoring to get to this point.
2012-01-10 22:41:55 -05:00
Kristian Høgsberg
bb97700474 window: Get rid of the window child allocation concept 2012-01-10 19:11:42 -05:00
Kristian Høgsberg
27ff086b8e window: Break widget grab before shell surface move or grab 2012-01-10 14:28:58 -05:00
Kristian Høgsberg
5e41f09752 wscreensaver: Use a widget and a redraw handler 2012-01-10 14:22:22 -05:00
Kristian Høgsberg
441338cb75 window: Keep widgets in a tree instead of a list 2012-01-10 14:22:14 -05:00
Kristian Høgsberg
30948989ee window: Use surface coordinates for looking up widgets 2012-01-10 14:22:14 -05:00
Kristian Høgsberg
b67e94b170 window: Make resize and redraw handlers widget vfuncs 2012-01-10 14:22:10 -05:00
Kristian Høgsberg
5d12990dbe window: Allocate and flush the window surface in window.c
No need to push this to the toolkit users.
2012-01-10 12:25:32 -05:00
Kristian Høgsberg
75bc667a70 window: Drop the window widget
It was just a temporary convenience for moving things over.
2012-01-10 10:45:52 -05:00
Kristian Høgsberg
cadd0f5cd9 clients/image: Delete old old key code 2012-01-09 18:56:37 -05:00
Kristian Høgsberg
9ca2d08fb0 window: Run deferred tasks before blocking for initial iteration
The first iteration of the while loop wouldn't run the deferred tasks
before blocking in epoll_wait().  Move things around so we do.
2012-01-09 18:48:14 -05:00
Kristian Høgsberg
bb901fac90 window: Return pointer type from widget enter handler 2012-01-09 11:22:32 -05:00
Kristian Høgsberg
5388080949 desktop-shell: Rename panel_widget to panel_launcher 2012-01-09 11:16:50 -05:00
Kristian Høgsberg
a8a0db3497 window: Move button handler to widget 2012-01-09 11:12:05 -05:00
Kristian Høgsberg
19dd1d7eb1 window: Use the window widget instead of adding a window sized widget 2012-01-09 10:42:41 -05:00
Kristian Høgsberg
87a57bbd73 window: Create a widget for the window, drop window motion handler 2012-01-09 10:34:35 -05:00
Kristian Høgsberg
5f190ef96a window: Convert a few clients to use widget motion handler 2012-01-09 09:44:45 -05:00
Kristian Høgsberg
04e98344cf window: Add a widget motion handler 2012-01-09 09:36:16 -05:00