|
|
|
@ -230,10 +230,9 @@ panel_redraw_handler(struct window *window, void *data) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
static void |
|
|
|
|
panel_widget_focus_handler(struct window *window, |
|
|
|
|
struct widget *focus, void *data) |
|
|
|
|
panel_widget_focus_handler(struct widget *widget, void *data) |
|
|
|
|
{ |
|
|
|
|
window_schedule_redraw(window); |
|
|
|
|
widget_schedule_redraw(widget); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
static void |
|
|
|
@ -285,7 +284,6 @@ panel_create(struct display *display) |
|
|
|
|
window_set_custom(panel->window); |
|
|
|
|
window_set_user_data(panel->window, panel); |
|
|
|
|
window_set_button_handler(panel->window, panel_button_handler); |
|
|
|
|
window_set_widget_focus_handler(panel->window, panel_widget_focus_handler); |
|
|
|
|
|
|
|
|
|
return panel; |
|
|
|
|
} |
|
|
|
@ -300,7 +298,9 @@ panel_add_widget(struct panel *panel, const char *icon, const char *path) |
|
|
|
|
widget->icon = cairo_image_surface_create_from_png(icon); |
|
|
|
|
widget->path = strdup(path); |
|
|
|
|
widget->panel = panel; |
|
|
|
|
window_add_widget(panel->window, widget); |
|
|
|
|
|
|
|
|
|
widget->widget = window_add_widget(panel->window, widget); |
|
|
|
|
widget_set_focus_handler(widget->widget, panel_widget_focus_handler); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
static void |
|
|
|
@ -438,10 +438,9 @@ unlock_dialog_keyboard_focus_handler(struct window *window, |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
static void |
|
|
|
|
unlock_dialog_widget_focus_handler(struct window *window, |
|
|
|
|
struct widget *focus, void *data) |
|
|
|
|
unlock_dialog_widget_focus_handler(struct widget *widget, void *data) |
|
|
|
|
{ |
|
|
|
|
window_schedule_redraw(window); |
|
|
|
|
widget_schedule_redraw(widget); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
static struct unlock_dialog * |
|
|
|
@ -464,9 +463,9 @@ unlock_dialog_create(struct desktop *desktop) |
|
|
|
|
window_set_keyboard_focus_handler(dialog->window, |
|
|
|
|
unlock_dialog_keyboard_focus_handler); |
|
|
|
|
window_set_button_handler(dialog->window, unlock_dialog_button_handler); |
|
|
|
|
window_set_widget_focus_handler(dialog->window, |
|
|
|
|
unlock_dialog_widget_focus_handler); |
|
|
|
|
dialog->button = window_add_widget(dialog->window, NULL); |
|
|
|
|
widget_set_focus_handler(dialog->button, |
|
|
|
|
unlock_dialog_widget_focus_handler); |
|
|
|
|
|
|
|
|
|
desktop_shell_set_lock_surface(desktop->shell, |
|
|
|
|
window_get_wl_shell_surface(dialog->window)); |
|
|
|
|