@@ -42,7 +42,7 @@ void _al_display_xglx_init_dnd_atoms(ALLEGRO_SYSTEM_XGLX *s)
42
42
*/
43
43
static void read_property (Property * p , Display * disp , Window w , Atom prop )
44
44
{
45
- unsigned char * ret = NULL ;
45
+ unsigned char * ret = NULL ;
46
46
Atom type ;
47
47
int fmt ;
48
48
unsigned long count ;
@@ -51,15 +51,15 @@ static void read_property(Property *p, Display *disp, Window w, Atom prop)
51
51
52
52
do {
53
53
if (ret != 0 ) XFree (ret );
54
- XGetWindowProperty (disp , w , prop , 0 , bytes_fetch , False ,
54
+ XGetWindowProperty (disp , w , prop , 0 , bytes_fetch , false ,
55
55
AnyPropertyType , & type , & fmt , & count , & bytes_left , & ret );
56
56
bytes_fetch += bytes_left ;
57
57
} while (bytes_left != 0 );
58
58
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 ;
63
63
}
64
64
65
65
/* 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)
70
70
Atom request = None ;
71
71
char * name ;
72
72
int i ;
73
- for (i = 0 ; i < list_count && request == None ; i ++ ) {
73
+ for (i = 0 ; i < list_count && request == None ; i ++ ) {
74
74
name = XGetAtomName (disp , list [i ]);
75
75
if ((strcmp ("text/uri-list" , name ) == 0 ) || (strcmp ("text/plain" , name ) == 0 )) {
76
76
request = list [i ];
@@ -86,7 +86,7 @@ static Atom pick_target(Display *disp, Atom list[], int list_count)
86
86
*/
87
87
static Atom pick_target_from_atoms (Display * disp , Atom a0 , Atom a1 , Atom a2 )
88
88
{
89
- int count = 0 ;
89
+ int count = 0 ;
90
90
Atom atom [3 ];
91
91
if (a0 != None ) atom [count ++ ] = a0 ;
92
92
if (a1 != None ) atom [count ++ ] = a1 ;
@@ -130,7 +130,7 @@ static void x11_reply(ALLEGRO_SYSTEM_XGLX *s, ALLEGRO_DISPLAY_XGLX *allegro_disp
130
130
m .data .l [1 ] = s -> dnd_info .xdnd_req != None ;
131
131
m .data .l [2 ] = s -> dnd_info .xdnd_req != None ? s -> dnd_info .XdndActionCopy : None ;
132
132
}
133
- XSendEvent (s -> x11display , window , False , NoEventMask , (XEvent * )& m );
133
+ XSendEvent (s -> x11display , window , false , NoEventMask , (XEvent * )& m );
134
134
XSync (s -> x11display , 0 );
135
135
}
136
136
@@ -197,14 +197,14 @@ bool _al_display_xglx_handle_drag_and_drop(ALLEGRO_SYSTEM_XGLX *s,
197
197
// we don't send the text yet to avoid all the string allocations
198
198
last_drop_x = window_x ;
199
199
last_drop_y = window_y ;
200
- _send_event (allegro_display , NULL , False , 0 , False );
200
+ _send_event (allegro_display , NULL , false , 0 , false );
201
201
x11_reply (s , allegro_display , xevent -> xclient .data .l [0 ], s -> dnd_info .XdndStatus );
202
202
return true;
203
203
}
204
204
else if (xevent -> xclient .message_type == s -> dnd_info .XdndDrop ) {
205
205
if (s -> dnd_info .xdnd_req == None ) {
206
206
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 );
208
208
ALLEGRO_DEBUG ("Xdnd aborted\n" );
209
209
} else {
210
210
ALLEGRO_DEBUG ("Xdnd received, converting to selection\n" );
@@ -221,7 +221,7 @@ bool _al_display_xglx_handle_drag_and_drop(ALLEGRO_SYSTEM_XGLX *s,
221
221
return true;
222
222
}
223
223
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 );
225
225
ALLEGRO_DEBUG ("Xdnd cancelled\n" );
226
226
}
227
227
return false;
@@ -344,7 +344,7 @@ void _al_xwin_accept_drag_and_drop(ALLEGRO_DISPLAY *display, bool accept)
344
344
Atom xdnd_version = 5 ;
345
345
XChangeProperty (system -> x11display , glx -> window , XdndAware , XA_ATOM , 32 ,
346
346
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
+ }
350
350
}
0 commit comments