projects
/
profile
/
ivi
/
weston.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
d31fcab
)
flower: Redraw flower on middle click, pop up window menu on right click
author
Kristian Høgsberg
<krh@bitplanet.net>
Tue, 31 Jan 2012 14:54:04 +0000
(09:54 -0500)
committer
Kristian Høgsberg
<krh@bitplanet.net>
Tue, 31 Jan 2012 14:54:04 +0000
(09:54 -0500)
clients/flower.c
patch
|
blob
|
history
diff --git
a/clients/flower.c
b/clients/flower.c
index
5623f5e
..
8b57626
100644
(file)
--- a/
clients/flower.c
+++ b/
clients/flower.c
@@
-33,6
+33,7
@@
#include <sys/time.h>
#include <glib.h>
#include <sys/time.h>
#include <glib.h>
+#include <linux/input.h>
#include <wayland-client.h>
#include "window.h"
#include <wayland-client.h>
#include "window.h"
@@
-135,8
+136,20
@@
button_handler(struct widget *widget,
{
struct flower *flower = data;
{
struct flower *flower = data;
- if (state)
- window_move(flower->window, input, time);
+ switch (button) {
+ case BTN_LEFT:
+ if (state)
+ window_move(flower->window, input, time);
+ break;
+ case BTN_MIDDLE:
+ if (state)
+ widget_schedule_redraw(widget);
+ break;
+ case BTN_RIGHT:
+ if (state)
+ window_show_frame_menu(flower->window, input, time);
+ break;
+ }
}
int main(int argc, char *argv[])
}
int main(int argc, char *argv[])