diff options
author | Jasper St. Pierre <jstpierre@mecheye.net> | 2014-02-18 19:18:42 -0500 |
---|---|---|
committer | Jasper St. Pierre <jstpierre@mecheye.net> | 2014-02-18 19:20:18 -0500 |
commit | 5a183329cac23d58f66de6de522b8e15e2a82f45 (patch) | |
tree | ee84ca2f682cc1814d9de9d1fa61729996d741c3 | |
parent | 63a9c336f3a07441d36dfe3e4cb60788a073aac3 (diff) |
clients: Add support for the minimize button
-rw-r--r-- | clients/window.c | 15 | ||||
-rw-r--r-- | clients/window.h | 3 |
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 * |