Skip to content

Commit cb7675f

Browse files
SiegeLordExSiegeLord
authored andcommitted
Format xdnd.c
1 parent 6cf1825 commit cb7675f

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

src/x/xdnd.c

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ void _al_display_xglx_init_dnd_atoms(ALLEGRO_SYSTEM_XGLX *s)
4242
*/
4343
static void read_property(Property *p, Display *disp, Window w, Atom prop)
4444
{
45-
unsigned char *ret=NULL;
45+
unsigned char *ret = NULL;
4646
Atom type;
4747
int fmt;
4848
unsigned long count;
@@ -51,15 +51,15 @@ static void read_property(Property *p, Display *disp, Window w, Atom prop)
5151

5252
do {
5353
if (ret != 0) XFree(ret);
54-
XGetWindowProperty(disp, w, prop, 0, bytes_fetch, False,
54+
XGetWindowProperty(disp, w, prop, 0, bytes_fetch, false,
5555
AnyPropertyType, &type, &fmt, &count, &bytes_left, &ret);
5656
bytes_fetch += bytes_left;
5757
} while (bytes_left != 0);
5858

59-
p->data=ret;
60-
p->format=fmt;
61-
p->count=count;
62-
p->type=type;
59+
p->data = ret;
60+
p->format = fmt;
61+
p->count = count;
62+
p->type = type;
6363
}
6464

6565
/* Find text-uri-list in a list of targets and return it's atom
@@ -70,7 +70,7 @@ static Atom pick_target(Display *disp, Atom list[], int list_count)
7070
Atom request = None;
7171
char *name;
7272
int i;
73-
for (i=0; i < list_count && request == None; i++) {
73+
for (i = 0; i < list_count && request == None; i++) {
7474
name = XGetAtomName(disp, list[i]);
7575
if ((strcmp("text/uri-list", name) == 0) || (strcmp("text/plain", name) == 0)) {
7676
request = list[i];
@@ -86,7 +86,7 @@ static Atom pick_target(Display *disp, Atom list[], int list_count)
8686
*/
8787
static Atom pick_target_from_atoms(Display *disp, Atom a0, Atom a1, Atom a2)
8888
{
89-
int count=0;
89+
int count = 0;
9090
Atom atom[3];
9191
if (a0 != None) atom[count++] = a0;
9292
if (a1 != None) atom[count++] = a1;
@@ -130,7 +130,7 @@ static void x11_reply(ALLEGRO_SYSTEM_XGLX *s, ALLEGRO_DISPLAY_XGLX *allegro_disp
130130
m.data.l[1] = s->dnd_info.xdnd_req != None;
131131
m.data.l[2] = s->dnd_info.xdnd_req != None ? s->dnd_info.XdndActionCopy : None;
132132
}
133-
XSendEvent(s->x11display, window, False, NoEventMask, (XEvent*)&m);
133+
XSendEvent(s->x11display, window, false, NoEventMask, (XEvent*)&m);
134134
XSync(s->x11display, 0);
135135
}
136136

@@ -197,14 +197,14 @@ bool _al_display_xglx_handle_drag_and_drop(ALLEGRO_SYSTEM_XGLX *s,
197197
// we don't send the text yet to avoid all the string allocations
198198
last_drop_x = window_x;
199199
last_drop_y = window_y;
200-
_send_event(allegro_display, NULL, False, 0, False);
200+
_send_event(allegro_display, NULL, false, 0, false);
201201
x11_reply(s, allegro_display, xevent->xclient.data.l[0], s->dnd_info.XdndStatus);
202202
return true;
203203
}
204204
else if (xevent->xclient.message_type == s->dnd_info.XdndDrop) {
205205
if (s->dnd_info.xdnd_req == None) {
206206
x11_reply(s, allegro_display, xevent->xclient.data.l[0], s->dnd_info.XdndFinished);
207-
_send_event(allegro_display, NULL, False, 0, True);
207+
_send_event(allegro_display, NULL, false, 0, true);
208208
ALLEGRO_DEBUG("Xdnd aborted\n");
209209
} else {
210210
ALLEGRO_DEBUG("Xdnd received, converting to selection\n");
@@ -221,7 +221,7 @@ bool _al_display_xglx_handle_drag_and_drop(ALLEGRO_SYSTEM_XGLX *s,
221221
return true;
222222
}
223223
else if (xevent->xclient.message_type == s->dnd_info.XdndLeave) {
224-
_send_event(allegro_display, NULL, False, 0, True);
224+
_send_event(allegro_display, NULL, false, 0, true);
225225
ALLEGRO_DEBUG("Xdnd cancelled\n");
226226
}
227227
return false;
@@ -344,7 +344,7 @@ void _al_xwin_accept_drag_and_drop(ALLEGRO_DISPLAY *display, bool accept)
344344
Atom xdnd_version = 5;
345345
XChangeProperty(system->x11display, glx->window, XdndAware, XA_ATOM, 32,
346346
PropModeReplace, (unsigned char*)&xdnd_version, 1);
347-
} else {
348-
XDeleteProperty(system->x11display, glx->window, XdndAware);
349-
}
347+
} else {
348+
XDeleteProperty(system->x11display, glx->window, XdndAware);
349+
}
350350
}

0 commit comments

Comments
 (0)