summaryrefslogtreecommitdiff
path: root/clients/resizor.c
diff options
context:
space:
mode:
authorKristian Høgsberg <krh@bitplanet.net>2012-01-04 22:19:14 -0500
committerKristian Høgsberg <krh@bitplanet.net>2012-01-06 11:41:55 -0500
commitb3cca0a41130ff45b70b730cb8f2273dd91531a5 (patch)
treed5e194f60ec466f2daa9bbcb1be17331dce3e3c4 /clients/resizor.c
parentdade64968ca00d31db24d3d8909cdf37699f842c (diff)
downloadweston-b3cca0a41130ff45b70b730cb8f2273dd91531a5.tar.gz
weston-b3cca0a41130ff45b70b730cb8f2273dd91531a5.tar.bz2
weston-b3cca0a41130ff45b70b730cb8f2273dd91531a5.zip
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.
Diffstat (limited to 'clients/resizor.c')
-rw-r--r--clients/resizor.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/clients/resizor.c b/clients/resizor.c
index 2f32ad5b..867ceb90 100644
--- a/clients/resizor.c
+++ b/clients/resizor.c
@@ -167,7 +167,7 @@ key_handler(struct window *window, struct input *input, uint32_t time,
}
static void
-show_menu(struct resizor *resizor, struct input *input)
+show_menu(struct resizor *resizor, struct input *input, uint32_t time)
{
int32_t x, y;
static const char *entries[] = {
@@ -176,7 +176,7 @@ show_menu(struct resizor *resizor, struct input *input)
input_get_position(input, &x, &y);
resizor->menu = window_create_menu(resizor->display,
- resizor->window,
+ input, time, resizor->window,
x - 10, y - 10, entries, 4);
window_schedule_redraw(resizor->menu);
@@ -192,7 +192,7 @@ button_handler(struct window *window,
switch (button) {
case BTN_RIGHT:
if (state)
- show_menu(resizor, input);
+ show_menu(resizor, input, time);
break;
}
}