-
I think it also needs to look like this (not a diff, because I reindented and the diff screwed everything up):
static void gdk_x11_drop_status (GdkDrop *drop, GdkDragAction actions, GdkDragAction preferred) { GdkX11Drop *drop_x11 = GDK_X11_DROP (drop); GdkDragAction possible_actions, suggested_action; XEvent xev; GdkDisplay *display; display = gdk_drop_get_display (drop); possible_actions = actions & gdk_drop_get_actions (drop); if (preferred & possible_actions) suggested_action = preferred; else if (drop_x11->suggestes_action & possible_actions) suggested_action = self->suggested_action; else if (possible_actions & GDK_ACTION_COPY) suggested_action = GDK_ACTION_COPY; else if (possible_actions & GDK_ACTION_MOVE) suggested_action = GDK_ACTION_MOVE; else if (possible_actions & GDK_ACTION_ASK) suggested_action = GDK_ACTION_ASK; else suggested_action = 0; xev.xclient.type = ClientMessage; xev.xclient.message_type = gdk_x11_get_xatom_by_name_for_display (display, "XdndStatus"); xev.xclient.format = 32; xev.xclient.window = drop_x11->source_window; xev.xclient.data.l[0] = GDK_SURFACE_XID (gdk_drop_get_surface (drop)); xev.xclient.data.l[1] = (possible_actions != 0) ? (2 | 1) : 0; xev.xclient.data.l[2] = 0; xev.xclient.data.l[3] = 0; xev.xclient.data.l[4] = xdnd_action_to_atom (display, suggested_action);
Please register or sign in to comment