~ubuntu-branches/ubuntu/vivid/mpv/vivid

« back to all changes in this revision

Viewing changes to video/out/wayland_common.c

  • Committer: Package Import Robot
  • Author(s): Alessandro Ghedini
  • Date: 2014-04-30 13:28:31 UTC
  • mfrom: (1.1.18)
  • Revision ID: package-import@ubuntu.com-20140430132831-8lchxxcdc2dzww3v
Tags: 0.3.9-1
New upstream release

Show diffs side-by-side

added added

removed removed

Lines of Context:
112
112
 
113
113
/** Wayland listeners **/
114
114
 
115
 
static void display_handle_error(void *data,
116
 
                                 struct wl_display *display,
117
 
                                 void *object_id,
118
 
                                 uint32_t code,
119
 
                                 const char *message)
120
 
{
121
 
    struct vo_wayland_state *wl = data;
122
 
    const char * error_type_msg = "";
123
 
 
124
 
    switch (code) {
125
 
    case WL_DISPLAY_ERROR_INVALID_OBJECT:
126
 
        error_type_msg = "Invalid object";
127
 
        break;
128
 
    case WL_DISPLAY_ERROR_INVALID_METHOD:
129
 
        error_type_msg = "Invalid method";
130
 
        break;
131
 
    case WL_DISPLAY_ERROR_NO_MEMORY:
132
 
        error_type_msg = "No memory";
133
 
        break;
134
 
    }
135
 
 
136
 
    MP_ERR(wl, "%s: %s\n", error_type_msg, message);
137
 
}
138
 
 
139
 
static void display_handle_delete_id(void *data,
140
 
                                     struct wl_display *display,
141
 
                                     uint32_t id)
142
 
{
143
 
    struct vo_wayland_state *wl = data;
144
 
    MP_DBG(wl, "Object %u deleted\n", id);
145
 
}
146
 
 
147
 
static const struct wl_display_listener display_listener = {
148
 
    display_handle_error,
149
 
    display_handle_delete_id
150
 
};
151
 
 
152
115
static void ssurface_handle_ping(void *data,
153
116
                                 struct wl_shell_surface *shell_surface,
154
117
                                 uint32_t serial)
644
607
        return false;
645
608
    }
646
609
 
647
 
    wl_display_add_listener(wl->display.display, &display_listener, wl);
648
 
 
649
610
    wl->display.registry = wl_display_get_registry(wl->display.display);
650
611
    wl_registry_add_listener(wl->display.registry, &registry_listener, wl);
651
612