Commit Graph

338 Commits

Author SHA1 Message Date
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
Kristian Høgsberg ab9e79ffc2 window: Remove window enter/leave handlers 2012-01-09 09:32:07 -05:00
Kristian Høgsberg ac7619f3f4 dnd: Use a widget for enter/leave handling 2012-01-09 09:26:38 -05:00
Kristian Høgsberg 391649b0dc window: Use widget enter/leave handlers for menu 2012-01-09 09:22:30 -05:00
Kristian Høgsberg ee143236d7 window: Replace widget focus handler with a enter/leave handler pair 2012-01-09 08:42:24 -05:00
Kristian Høgsberg 21eabf60b0 window: Use display_exit() instead of exit() in window menu 2012-01-08 15:41:52 -05:00
Kristian Høgsberg 9a13dab8a9 window: Move widget focus handler to the widget 2012-01-08 15:18:19 -05:00
Kristian Høgsberg c51f79954b window: Rename item to widget
It's a widget.
2012-01-08 15:09:53 -05:00
Kristian Høgsberg 4f7dcd6eb1 window: Add a window menu
At least this gives us a way to close the toy toolkit clients.
2012-01-06 22:03:44 -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 9724b51750 More weston rename fixes 2012-01-03 14:35:49 -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
Kristian Høgsberg 727bacdddf terminal: Don't close fd twice 2011-12-28 22:04:27 -05:00
Kristian Høgsberg e7aaec301a x11: Bridge X11 CLIPBOARD selection to Wayland clients 2011-12-27 13:50:04 -05:00
Kristian Høgsberg 558949b67b clients: Add simple-touch client for testing touch events. 2011-12-22 13:45:50 -05:00
Kristian Høgsberg e04ad57a01 window.c: Add touch event stubs
Prevent window.c clients from crashing on touch events.
2011-12-22 11:32:38 -05:00
Kristian Høgsberg 8a1d10d66c window.c: Rename input handlers to input_handle_*
They're event handlers for the input object, not the window object.
2011-12-22 11:32:34 -05:00
Pekka Paalanen 325bb60792 window: destroy surfaces on display_destroy()
Destroy the window decoration surfaces and pointer surfaces.

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2011-12-22 11:27:51 +02:00
Pekka Paalanen e1207c708e window: destroy all inputs on display_destroy()
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2011-12-22 11:27:51 +02:00
Pekka Paalanen c20529846e window: destroy misc objects on display_destroy()
Windows are supposed to be destroyed by the application explicitly.

Deferred tasks are not supposed to be added after returning from
display_run().

Destroy remaining wl objects (except input related will be in a
following patch).

Close the epoll fd.

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2011-12-22 11:27:51 +02:00
Pekka Paalanen 2c1426a72f window: destroy outputs on display_destroy()
This will also start calling the output destroy handlers, if an
application has set any.

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2011-12-22 11:27:51 +02:00
Pekka Paalanen 5ec6585753 window: destroy window surfaces and title
Plugs leaks from struct window in window_destroy().

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2011-12-22 11:27:51 +02:00
Pekka Paalanen 51ce95a6eb window: remove unused struct members
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2011-12-22 11:27:50 +02:00
Pekka Paalanen e59d74a9b9 resizor: add exit key and cleanups
Make resizor quit when you press Esc key.

Call the toytoolkit cleanup functions, properly destroy window, display
and frame callback.

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2011-12-22 11:27:50 +02:00
Pekka Paalanen fe6079ac09 window: add display_destroy()
Add a function to destroy the 'struct display', supposedly with all
contained resources, that are not explicitly created by the application.

The implementation at this time is incomplete. It does clean up the
following:
- xkb structure is freed (needs new libxkbcommon from git)
- EGL resources are freed
- wl_display is flushed and destroyed

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2011-12-22 11:27:50 +02:00
Pekka Paalanen 826d795448 window: add display_exit()
Add a function, that schedules the display_run() event loop to break
out.

When display_exit() is called, processing continues as usual, until
currently waiting events and deferred tasks have been processed, and
sent requests are flushed. Then, display_run() will return.

This enables toytoolkit apps to handle their exit instead of just being
killed or call exit().

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2011-12-22 11:27:50 +02:00
Pekka Paalanen fb850c4e0f simple clients: flush before destroying wl_display
Flush our pending destroy requests to the server before destroying the
wl_display.

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2011-12-22 11:27:50 +02:00