diff options
author | Kristian Høgsberg <krh@bitplanet.net> | 2013-12-31 15:35:39 -0800 |
---|---|---|
committer | Kristian Høgsberg <krh@bitplanet.net> | 2013-12-31 15:35:51 -0800 |
commit | c152ee11e3d10b93499d9f42b00cfd57f8ad2ba4 (patch) | |
tree | 606f8ee1ae104e1f565ad5aedbddb2d2656aeb81 /clients | |
parent | a1df7acb78e0fde8eb3165a0e1c1a77da50ea651 (diff) | |
download | weston-c152ee11e3d10b93499d9f42b00cfd57f8ad2ba4.tar.gz |
window.c: Don't put buttons on frames for custom windows
Custom windows don't have a wl_shell_surface and can't do anything in
response to these button (except crash). This only affects the unlock
dialog.
https://bugs.freedesktop.org/show_bug.cgi?id=72542
Diffstat (limited to 'clients')
-rw-r--r-- | clients/window.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/clients/window.c b/clients/window.c index 43761ca6..d586244e 100644 --- a/clients/window.c +++ b/clients/window.c @@ -2467,10 +2467,17 @@ struct widget * window_frame_create(struct window *window, void *data) { struct window_frame *frame; + uint32_t buttons; + + if (window->type == TYPE_CUSTOM) { + buttons = FRAME_BUTTON_NONE; + } else { + buttons = FRAME_BUTTON_ALL; + } frame = xzalloc(sizeof *frame); frame->frame = frame_create(window->display->theme, 0, 0, - FRAME_BUTTON_ALL, window->title); + buttons, window->title); frame->widget = window_add_widget(window, frame); frame->child = widget_add_widget(frame->widget, data); |