Commit Graph

69 Commits

Author SHA1 Message Date
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 e7aaec301a x11: Bridge X11 CLIPBOARD selection to Wayland clients 2011-12-27 13:50:04 -05: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
Kristian Høgsberg bbedd7e9d2 clients: Implement a toy-menu for testing the menu surface type 2011-12-19 15:40:10 -05:00
Pekka Paalanen 999c5b5dcb window: expose outputs to applications
Add output_configure_handler as a display property. This exposes only
configured outputs, that is the current mode info is already received,
to applications.

The handler is also called for mode changes on an existing output. This
simplifies the implementation in toytoolkit as we can defer the handler
calls from wl_output binding time to when we receive the current mode.
We do not need separate handlers for "new output" and "mode changed". A
plain "new output" handler would be problematic as the current mode is
not known yet.

Also add delete_handler hook for outputs, but that will never be called
for now, as the protocol lacks a way to signal output disconnections.

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2011-12-14 11:17:46 +02:00
Pekka Paalanen c1765c67b3 move config parser to a convenience library
Create a new directory for convenience librariers that can be shared
between compositor components and clients.

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2011-12-08 10:25:12 +02:00
Pekka Paalanen 9d1613eb4a wl_shell_surface adaptation
Protocol changes in Wayland core introduced a new interface
wl_shell_surface, and moved all wl_shell surface methods into it. Adapt
the compositor and its Wayland backend, shell plugin, and all clients to
the new interface.

Depends on the Wayland core commit "protocol: introduce wl_shell_surface"

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2011-12-04 14:54:26 -05:00
Kristian Høgsberg 53ff2f6672 window.c: Cache outputs 2011-11-26 17:27:37 -05:00
Kristian Høgsberg 47fe08aad5 Implement the new dnd/selection protocol
The new protocol splits dnd/selection from wl_shell and allows us to move
the implementation out of shell.c.
2011-11-23 16:20:28 -05:00
Pekka Paalanen 668dd56918 window: add a helper for config file paths
Add a helper function, that constructs a path to a config file from
XDG_CONFIG_HOME environment variable, by the rules of
http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html

Make desktop-shell find its config file from XDG_CONFIG_HOME. This
allows to have a personal config file without continuously fighting with
git about wayland-desktop-shell.ini.

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2011-11-15 08:57:01 -05:00
Kristian Høgsberg ac3a59a0d1 window: Add a cheesy parser for ini-files, use it in desktop-shell 2011-11-14 22:51:02 -05:00
Kristian Høgsberg bcee9a4b25 desktop-shell: Add beginning of pop-up menu to panel 2011-10-12 00:36:16 -04:00
Benjamin Franzke 1a89f28c7d gears: Fail if compiled without cairo-egl 2011-10-07 10:06:01 +02:00
Benjamin Franzke 0c99163d9b window: Create a cairo device for each egl config 2011-10-07 10:06:01 +02:00
Benjamin Franzke 47eb8f4e91 window: Remove display_flush_cairo_device
Rather add a flush_surface utility that
flushed the cairo_device thats associated to a surface.
2011-10-07 10:05:57 +02:00
Kristian Høgsberg e28d05b0ad window.c: Move window items to window.c 2011-09-20 21:43:54 -04:00
Kristian Høgsberg 3a69627f43 window: Stop using glib mainloop in toy toolkit 2011-09-19 17:28:55 -04:00
Kristian Høgsberg 0c29eb292e clients: Add a simple desktop-shell app
This just provides the background surface and the top panel.
2011-09-06 18:02:34 -04:00
Kristian Høgsberg 900b226ac1 window: Add enter/leave handlers 2011-09-06 14:33:52 -04:00
Kristian Høgsberg 9de79a92a6 window.c: Drop global handler argument
We can just register a global handler directly on the wl_display now.
2011-08-29 17:12:36 -04:00
Kristian Høgsberg 3be87d1931 window: Add support for opaque windows 2011-05-16 14:46:41 -04:00
Benjamin Franzke bde55ec8e4 Implement buffer.damage in shm, use it in window.c 2011-04-22 11:53:45 -04:00
Kristian Høgsberg 01aed1c665 Remove double definition of window_get_wl_surface() 2011-04-11 16:59:05 -04:00
Kristian Høgsberg 11e2828bdc Merge remote-tracking branch 'bnf/surface-frame-event'
Conflicts:
	compositor/compositor.c
2011-04-11 16:47:50 -04:00
Kristian Høgsberg 386857ba6a Add struct window accessor for the wl_surface 2011-04-11 13:17:44 -04:00
Tim Wiederhake b4b67344f0 Define global handler on display creation
Otherwise the initial announcement of interfaces gets lost.
2011-04-11 13:16:33 -04:00
Benjamin Franzke cff904e69d gears: Use wayland egl surface instead of images 2011-03-17 15:55:25 +01:00
Benjamin Franzke 6693ac2108 window: Use window surfaces for windows 2011-03-17 15:55:18 +01:00
Benjamin Franzke ec4d342aa9 Support per surface frame events
This fixes tearing with multi head.
2011-03-17 11:54:35 +01:00
Kristian Høgsberg 297c6313eb Port window.c to use wayland-egl 2011-02-07 09:12:56 -05:00
Kristian Høgsberg 734a7501b6 Remove frame handler prototype
I messed up the merge.
2011-01-25 12:44:19 -05:00
Kristian Høgsberg 6ec41abf72 Merge remote branch 'callum/master'
Conflicts:
	clients/window.h
2011-01-25 10:40:01 -05:00
Tim Wiederhake dc3f817538 remove declaration without definition from window.h 2011-01-23 13:58:43 -05:00
Kristian Høgsberg 248c1b61ce Add an orange pop-up menu to test the new map_transient request 2011-01-21 18:03:15 -05:00
Callum Lowcay 6eeeb30021 Merge branch 'master' of git://anongit.freedesktop.org/wayland
Conflicts:
	clients/window.h
2011-01-22 12:00:48 +13:00
Kristian Høgsberg 6bccebee23 terminal: Just send the pty master fd to receive the selection.
LOL!!1
2011-01-21 16:26:28 -05:00
Kristian Høgsberg e164e4ef72 Use cairo_push_group() for all double buffering, drop window_copy_*() 2011-01-21 11:35:05 -05:00
Kristian Høgsberg 23c03ad981 Use libxkbcommon #defines for modifiers 2011-01-19 14:41:20 -05:00
Kristian Høgsberg 58eec36f68 Add proof-of-concept selection support to terminal
Next will be to support mouse selections so we can copy and paste
something more interesting than just 'selection data'.
2011-01-19 14:27:42 -05:00
Kristian Høgsberg 67cac8a565 Pass input device and time in key_handler callback
Move the modifiers to a input device getter function.
2011-01-19 14:25:13 -05:00
Kristian Høgsberg 943741cb40 Use the global handler in dnd instead of custom drag_offer hook 2011-01-19 14:25:12 -05:00
Kristian Høgsberg b46df05fa8 window: Add a catch-all global handler hook 2011-01-19 14:25:12 -05:00
Kristian Høgsberg 8def264241 Check for cairo-egl instead of just cairo-gl 2011-01-14 17:42:50 -05:00
Callum Lowcay ef57a9b788 terminal: Window operations
Implement OSC 1 (set window title), and some basic CSI t window
operations.

Signed-off-by: Callum Lowcay <callum@callumscode.com>
2011-01-14 20:51:58 +13:00
Kristian Høgsberg da846ca91d Fix terminal resizing
Get snapping to character grid working again, avoid crashes when attempting
to resize below 1x1 character cell, only redraw when size actually changes.

Also, rename window_get_child_rectangle() to window_get_child_allocation().
2011-01-11 10:00:52 -05:00
nobled 9835417962 Workaround gears depending on cairo-gl
Extremely hacky, but at least it doesn't stop the build anymore.
2011-01-05 23:00:53 +00:00
Kristian Høgsberg 82da52b15b Update surface.attach and change surface.map to surface.map_toplevel
The new map_toplevel() request no longer specifies a position and takes
the size from the attached buffer.  The attach request now takes a
position relative to the top-left corner of the old buffer to let
clients specify the relative position of the new buffer.
2010-12-17 09:53:12 -05:00
Kristian Høgsberg 41da90897c Don't hardcode offered dnd types in window.c 2010-11-30 14:01:07 -05:00
Fred Morcos c4b8c457e8 fix missing includes in clients/window.h and clients/wayland-glib.h 2010-11-29 08:14:57 -05:00