summaryrefslogtreecommitdiff
path: root/clients/resizor.c
AgeCommit message (Collapse)AuthorFilesLines
2013-02-20Pass argc pointer to parse_options()Kristian Høgsberg1-1/+1
This lets us keep argc up to date as the backend picks out arguments from the argv array.
2012-05-31Use enum wl_keyboard_key_state instead of integerDaniel Stone1-2/+3
Instead of using a uint32_t for state everywhere (except on the wire, where that's still the call signature), use the new wl_keyboard_key_state enum, and explicit comparisons. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-05-31Use enum wl_pointer_button_state instead of integerDaniel Stone1-2/+2
Instead of using a uint32_t for state everywhere (except on the wire, where that's still the call signature), use the new wl_pointer_button_state enum, and explicit comparisons. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-05-11Update to new libxkbcommon APIKristian Høgsberg1-7/+5
We no longer depend on xproto, we use xkbcommon keycodes now. Yay!
2012-05-10resizor: More resizingKristian Høgsberg1-47/+87
Interacts better with interactive resizing, left/right keys now changes window width.
2012-05-07Change button from int to uint32_tDaniel Stone1-1/+1
Since you can't really have a negative button number. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-05-07Change key/button grab bindings to take unsigned stateDaniel Stone1-1/+1
'state' here meaning 'is it up or down?', obviously. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2012-03-12Add an option parserKristian Høgsberg1-1/+1
On one hand, getopt (in particular the -o suboption syntax) sucks on the server side, and on the client side we would like to avoid the glib dependency. We can roll out own option parser and solve both problems and save a few lines of code total.
2012-01-31window: Dont take width and height in window constructorKristian Høgsberg1-1/+1
Always set this by scheduling an initial resize.
2012-01-19window: menu leak fixesPekka Paalanen1-6/+2
When a menu self-destructs, free also the widget and struct menu. As menus are self-destructing, it does not make sense to store the window pointer, since we cannot clear it automatically. Therefore, rename window_create_menu() to window_show_menu() that does not return the window pointer. It also calls window_schedule_redraw() internally. Fixes Valgrind reported memory leaks. The alternative would be to explicitly destroy the menu in application's menu callback. Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2012-01-19resizor: free the widget on destroyPekka Paalanen1-0/+1
Plugs a memory leak. Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2012-01-10window: Make decorations just a widgetKristian Høgsberg1-1/+1
Woohoo, only took 25 commits of refactoring to get to this point.
2012-01-10window: Get rid of the window child allocation conceptKristian Høgsberg1-17/+16
2012-01-10window: Make resize and redraw handlers widget vfuncsKristian Høgsberg1-10/+3
2012-01-10window: Allocate and flush the window surface in window.cKristian Høgsberg1-5/+1
No need to push this to the toolkit users.
2012-01-10window: Drop the window widgetKristian Høgsberg1-4/+4
It was just a temporary convenience for moving things over.
2012-01-09window: Move button handler to widgetKristian Høgsberg1-3/+5
2012-01-06window: Add a window menuKristian Høgsberg1-1/+8
At least this gives us a way to close the toy toolkit clients.
2012-01-06shell: Start implementing the popup surface typeKristian Høgsberg1-3/+3
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.
2011-12-22resizor: add exit key and cleanupsPekka Paalanen1-9/+35
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-19clients: Implement a toy-menu for testing the menu surface typeKristian Høgsberg1-8/+8
2011-12-19resizor: Use symbolic name for BTN_RIGHTKristian Høgsberg1-1/+2
Also, we were actually using BTN_MIDDLE before.
2011-11-22Never include wayland-util.h directlyKristian Høgsberg1-1/+0
And fix a missing "" to <> conversion for wayland-client.h include.
2011-11-22Fix inconsistent #include stylePekka Paalanen1-1/+1
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2011-09-19window: Stop using glib mainloop in toy toolkitKristian Høgsberg1-1/+0
2011-08-29window.c: Drop global handler argumentKristian Høgsberg1-1/+1
We can just register a global handler directly on the wl_display now.
2011-08-29clients: Bring clients up to dateKristian Høgsberg1-9/+14
2011-04-11Merge remote-tracking branch 'bnf/surface-frame-event'Kristian Høgsberg1-3/+4
Conflicts: compositor/compositor.c
2011-04-11Define global handler on display creationTim Wiederhake1-1/+1
Otherwise the initial announcement of interfaces gets lost.
2011-03-17Support per surface frame eventsBenjamin Franzke1-3/+4
This fixes tearing with multi head.
2011-01-23remove unused variableTim Wiederhake1-1/+0
2011-01-21Add an orange pop-up menu to test the new map_transient requestKristian Høgsberg1-1/+36
2011-01-19Pass input device and time in key_handler callbackKristian Høgsberg1-2/+2
Move the modifiers to a input device getter function.
2011-01-11Fix terminal resizingKristian Høgsberg1-19/+14
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().
2010-12-17Update surface.attach and change surface.map to surface.map_toplevelKristian Høgsberg1-2/+1
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-16Fix the resizorKristian Høgsberg1-34/+34
2010-12-16Schedule frame callback in the redraw handlerKristian Høgsberg1-5/+7
2010-12-16Add window resize sample clientKristian Høgsberg1-0/+204
This is an example of how to animate window resizing. The size is animated by a simple physics model that allows the user to cancel the animation halfway and still look good.