summaryrefslogtreecommitdiff
path: root/clients
diff options
context:
space:
mode:
authorJasper St. Pierre <jstpierre@mecheye.net>2014-02-18 19:18:42 -0500
committerJasper St. Pierre <jstpierre@mecheye.net>2014-02-18 19:20:18 -0500
commit5a183329cac23d58f66de6de522b8e15e2a82f45 (patch)
treeee84ca2f682cc1814d9de9d1fa61729996d741c3 /clients
parent63a9c336f3a07441d36dfe3e4cb60788a073aac3 (diff)
downloadweston-5a183329cac23d58f66de6de522b8e15e2a82f45.tar.gz
clients: Add support for the minimize button
Diffstat (limited to 'clients')
-rw-r--r--clients/window.c15
-rw-r--r--clients/window.h3
2 files changed, 16 insertions, 2 deletions
diff --git a/clients/window.c b/clients/window.c
index 3ea50278..5c324d38 100644
--- a/clients/window.c
+++ b/clients/window.c
@@ -2354,8 +2354,10 @@ frame_handle_status(struct window_frame *frame, struct input *input,
if (status & FRAME_STATUS_REPAINT)
widget_schedule_redraw(frame->widget);
- if (status & FRAME_STATUS_MINIMIZE)
- fprintf(stderr,"Minimize stub\n");
+ if (status & FRAME_STATUS_MINIMIZE) {
+ window_set_minimized(window);
+ frame_status_clear(frame->frame, FRAME_STATUS_MINIMIZE);
+ }
if (status & FRAME_STATUS_MENU) {
window_show_frame_menu(window, input, time);
@@ -4205,6 +4207,15 @@ window_set_maximized(struct window *window, int maximized)
}
void
+window_set_minimized(struct window *window)
+{
+ if (!window->xdg_surface)
+ return;
+
+ xdg_surface_set_minimized(window->xdg_surface);
+}
+
+void
window_set_user_data(struct window *window, void *data)
{
window->user_data = data;
diff --git a/clients/window.h b/clients/window.h
index 7ec35375..38d574fb 100644
--- a/clients/window.h
+++ b/clients/window.h
@@ -377,6 +377,9 @@ void
window_set_maximized(struct window *window, int maximized);
void
+window_set_minimized(struct window *window);
+
+void
window_set_user_data(struct window *window, void *data);
void *