mirror of
https://github.com/gnustep/libs-back.git
synced 2025-04-22 07:21:02 +00:00
Fixes warnings reported by clang.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@32823 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
e6b42470de
commit
c5e5d1d202
9 changed files with 119 additions and 104 deletions
18
ChangeLog
18
ChangeLog
|
@ -1,3 +1,21 @@
|
|||
2011-04-09 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* Source/gsc/GSFunction.m (-initWith:): Correct printf format.
|
||||
* Source/x11/XGServerEvent.m (-XGErrorHandler::,
|
||||
-_XPointToOSPoint:for:, -processEvent:,
|
||||
-_handleTakeFocusAtom:forContext:, process_key_event): Correct printf format.
|
||||
* Source/x11/XGServerWindow.m (setNormalHints, -_OSFrameToXFrame:for:,
|
||||
-_OSFrameToXHints:for:, -_XFrameToOSFrame:for:, -_checkStyle:,
|
||||
-nativeWindow:...:, -styleoffsets:...:, -placewindow::,
|
||||
-setinputfocus:, -_DPSsetcursor::): Correct printf format.
|
||||
* Source/x11/XGServerWindow.m (-orderwindow): Remove misplaced semicolon.
|
||||
* Source/x11/XGDragView.m (-_resetDragTypesForWindow:): Correct printf format.
|
||||
* Source/x11/XIMInputServer.m (-ximStyleInit, -ximFocusICWindow:): Correct printf format.
|
||||
* Source/x11/XWindowBuffer.m: Correct printf format.
|
||||
* Source/GSBackend.m: Replace objc_get_class with NSClassFromString.
|
||||
* Tools/xpbs.m (-xSelectionNotify:): Correct printf format.
|
||||
Fixes warnings reported by clang.
|
||||
|
||||
2011-03-27 Eric Wasylishen <ewasylishen@gmail.com>
|
||||
|
||||
* Source/cairo/CairoFontEnumerator.m:
|
||||
|
|
|
@ -77,15 +77,15 @@
|
|||
context = [defs stringForKey: @"GSContext"];
|
||||
|
||||
if ([context isEqual: @"xdps"])
|
||||
contextClass = objc_get_class("NSDPSContext");
|
||||
contextClass = NSClassFromString(@"NSDPSContext");
|
||||
else if ([context isEqual: @"art"])
|
||||
contextClass = objc_get_class("ARTContext");
|
||||
contextClass = NSClassFromString(@"ARTContext");
|
||||
else if ([context isEqual: @"winlib"])
|
||||
contextClass = objc_get_class("WIN32Context");
|
||||
contextClass = NSClassFromString(@"WIN32Context");
|
||||
else if ([context isEqual: @"cairo"])
|
||||
contextClass = objc_get_class("CairoContext");
|
||||
contextClass = NSClassFromString(@"CairoContext");
|
||||
else
|
||||
contextClass = objc_get_class("XGContext");
|
||||
contextClass = NSClassFromString(@"XGContext");
|
||||
|
||||
[contextClass initializeBackend];
|
||||
}
|
||||
|
|
|
@ -111,8 +111,8 @@
|
|||
j = (j +7)/8;
|
||||
if ([data length] < j)
|
||||
{
|
||||
NSDebugLLog(@"GSFunction", @"Need %i bytes of data, DataSource only has %i bytes.",
|
||||
j, [data length]);
|
||||
NSDebugLLog(@"GSFunction", @"Need %i bytes of data, DataSource only has %lu bytes.",
|
||||
j, (unsigned long)[data length]);
|
||||
RELEASE(self);
|
||||
return nil;
|
||||
}
|
||||
|
|
|
@ -421,7 +421,7 @@ static XGDragView *sharedDragView = nil;
|
|||
|
||||
typelist = mimeTypeForPasteboardType(XDPY, [self zone],
|
||||
[drag_set allObjects]);
|
||||
NSDebugLLog(@"NSDragging", @"Set types on %x to %@",
|
||||
NSDebugLLog(@"NSDragging", @"Set types on %lu to %@",
|
||||
window->ident, drag_set);
|
||||
xdnd_set_dnd_aware(&dnd, window->ident, typelist);
|
||||
|
||||
|
|
|
@ -191,22 +191,22 @@ static int check_modifier (XEvent *xEvent, KeySym key_sym)
|
|||
{
|
||||
NSLog(@"X-Windows error - %s\n\
|
||||
on display: %s\n\
|
||||
type: %d\n\
|
||||
serial number: %d\n\
|
||||
type: %d\n\
|
||||
serial number: %lu\n\
|
||||
request code: %d\n",
|
||||
buffer,
|
||||
XDisplayName(DisplayString(display)),
|
||||
XDisplayName(DisplayString(display)),
|
||||
err->type, err->serial, err->request_code);
|
||||
return 0;
|
||||
}
|
||||
[NSException raise: NSWindowServerCommunicationException
|
||||
format: @"X-Windows error - %s\n\
|
||||
on display: %s\n\
|
||||
type: %d\n\
|
||||
serial number: %d\n\
|
||||
type: %d\n\
|
||||
serial number: %lu\n\
|
||||
request code: %d\n",
|
||||
buffer,
|
||||
XDisplayName(DisplayString(display)),
|
||||
XDisplayName(DisplayString(display)),
|
||||
err->type, err->serial, err->request_code];
|
||||
return 0;
|
||||
}
|
||||
|
@ -324,7 +324,7 @@ posixFileDescriptor: (NSPosixFileDescriptor*)fileDescriptor
|
|||
o.x = x.x + l;
|
||||
o.y = NSHeight(win->xframe) - x.y + b;
|
||||
|
||||
NSDebugLLog(@"Frame", @"X2OP %d, %x, %@, %@", win->number, style,
|
||||
NSDebugLLog(@"Frame", @"X2OP %lu, %x, %@, %@", win->number, style,
|
||||
NSStringFromPoint(x), NSStringFromPoint(o));
|
||||
return o;
|
||||
}
|
||||
|
@ -352,8 +352,8 @@ posixFileDescriptor: (NSPosixFileDescriptor*)fileDescriptor
|
|||
{
|
||||
// mouse button events
|
||||
case ButtonPress:
|
||||
NSDebugLLog(@"NSEvent", @"%d ButtonPress: \
|
||||
xEvent.xbutton.time %u timeOfLastClick %u \n",
|
||||
NSDebugLLog(@"NSEvent", @"%lu ButtonPress: \
|
||||
xEvent.xbutton.time %lu timeOfLastClick %lu \n",
|
||||
xEvent.xbutton.window, xEvent.xbutton.time,
|
||||
generic.lastClick);
|
||||
/*
|
||||
|
@ -506,7 +506,7 @@ posixFileDescriptor: (NSPosixFileDescriptor*)fileDescriptor
|
|||
break;
|
||||
|
||||
case ButtonRelease:
|
||||
NSDebugLLog(@"NSEvent", @"%d ButtonRelease\n",
|
||||
NSDebugLLog(@"NSEvent", @"%lu ButtonRelease\n",
|
||||
xEvent.xbutton.window);
|
||||
[self setLastTime: xEvent.xbutton.time];
|
||||
if (xEvent.xbutton.button == generic.lMouse)
|
||||
|
@ -560,12 +560,12 @@ posixFileDescriptor: (NSPosixFileDescriptor*)fileDescriptor
|
|||
break;
|
||||
|
||||
case CirculateNotify:
|
||||
NSDebugLLog(@"NSEvent", @"%d CirculateNotify\n",
|
||||
NSDebugLLog(@"NSEvent", @"%lu CirculateNotify\n",
|
||||
xEvent.xcirculate.window);
|
||||
break;
|
||||
|
||||
case CirculateRequest:
|
||||
NSDebugLLog(@"NSEvent", @"%d CirculateRequest\n",
|
||||
NSDebugLLog(@"NSEvent", @"%lu CirculateRequest\n",
|
||||
xEvent.xcirculaterequest.window);
|
||||
break;
|
||||
|
||||
|
@ -574,7 +574,7 @@ posixFileDescriptor: (NSPosixFileDescriptor*)fileDescriptor
|
|||
NSTimeInterval time;
|
||||
DndClass dnd = xdnd ();
|
||||
|
||||
NSDebugLLog(@"NSEvent", @"%d ClientMessage - %s\n",
|
||||
NSDebugLLog(@"NSEvent", @"%lu ClientMessage - %s\n",
|
||||
xEvent.xclient.window,
|
||||
XGetAtomName(dpy, xEvent.xclient.message_type));
|
||||
if (cWin == 0 || xEvent.xclient.window != cWin->ident)
|
||||
|
@ -609,7 +609,7 @@ posixFileDescriptor: (NSPosixFileDescriptor*)fileDescriptor
|
|||
else if ((Atom)xEvent.xclient.data.l[0]
|
||||
== generic.miniaturize_atom)
|
||||
{
|
||||
NSDebugLLog(@"Miniaturize", @"%d miniaturized", cWin->number);
|
||||
NSDebugLLog(@"Miniaturize", @"%lu miniaturized", cWin->number);
|
||||
eventLocation = NSMakePoint(0,0);
|
||||
e = [NSEvent otherEventWithType: NSAppKitDefined
|
||||
location: eventLocation
|
||||
|
@ -797,14 +797,14 @@ posixFileDescriptor: (NSPosixFileDescriptor*)fileDescriptor
|
|||
|
||||
case ColormapNotify:
|
||||
// colormap attribute
|
||||
NSDebugLLog(@"NSEvent", @"%d ColormapNotify\n",
|
||||
NSDebugLLog(@"NSEvent", @"%lu ColormapNotify\n",
|
||||
xEvent.xcolormap.window);
|
||||
break;
|
||||
|
||||
// the window has been resized, change the width and height
|
||||
// and update the window so the changes get displayed
|
||||
case ConfigureNotify:
|
||||
NSDebugLLog(@"NSEvent", @"%d ConfigureNotify "
|
||||
NSDebugLLog(@"NSEvent", @"%lu ConfigureNotify "
|
||||
@"x:%d y:%d w:%d h:%d b:%d %c", xEvent.xconfigure.window,
|
||||
xEvent.xconfigure.x, xEvent.xconfigure.y,
|
||||
xEvent.xconfigure.width, xEvent.xconfigure.height,
|
||||
|
@ -854,7 +854,7 @@ posixFileDescriptor: (NSPosixFileDescriptor*)fileDescriptor
|
|||
cWin->xframe = x;
|
||||
n = [self _XFrameToOSFrame: x for: cWin];
|
||||
NSDebugLLog(@"Moving",
|
||||
@"Update win %d:\n original:%@\n new:%@",
|
||||
@"Update win %lu:\n original:%@\n new:%@",
|
||||
cWin->number, NSStringFromRect(r),
|
||||
NSStringFromRect(x));
|
||||
/*
|
||||
|
@ -917,31 +917,31 @@ posixFileDescriptor: (NSPosixFileDescriptor*)fileDescriptor
|
|||
// same as ConfigureNotify but we get this event
|
||||
// before the change has actually occurred
|
||||
case ConfigureRequest:
|
||||
NSDebugLLog(@"NSEvent", @"%d ConfigureRequest\n",
|
||||
NSDebugLLog(@"NSEvent", @"%lu ConfigureRequest\n",
|
||||
xEvent.xconfigurerequest.window);
|
||||
break;
|
||||
|
||||
// a window has been created
|
||||
case CreateNotify:
|
||||
NSDebugLLog(@"NSEvent", @"%d CreateNotify\n",
|
||||
NSDebugLLog(@"NSEvent", @"%lu CreateNotify\n",
|
||||
xEvent.xcreatewindow.window);
|
||||
break;
|
||||
|
||||
// a window has been destroyed
|
||||
case DestroyNotify:
|
||||
NSDebugLLog(@"NSEvent", @"%d DestroyNotify\n",
|
||||
NSDebugLLog(@"NSEvent", @"%lu DestroyNotify\n",
|
||||
xEvent.xdestroywindow.window);
|
||||
break;
|
||||
|
||||
// when the pointer enters a window
|
||||
case EnterNotify:
|
||||
NSDebugLLog(@"NSEvent", @"%d EnterNotify\n",
|
||||
NSDebugLLog(@"NSEvent", @"%lu EnterNotify\n",
|
||||
xEvent.xcrossing.window);
|
||||
break;
|
||||
|
||||
// when the pointer leaves a window
|
||||
case LeaveNotify:
|
||||
NSDebugLLog(@"NSEvent", @"%d LeaveNotify\n",
|
||||
NSDebugLLog(@"NSEvent", @"%lu LeaveNotify\n",
|
||||
xEvent.xcrossing.window);
|
||||
if (cWin == 0 || xEvent.xcrossing.window != cWin->ident)
|
||||
{
|
||||
|
@ -964,7 +964,7 @@ posixFileDescriptor: (NSPosixFileDescriptor*)fileDescriptor
|
|||
|
||||
// the visibility of a window has changed
|
||||
case VisibilityNotify:
|
||||
NSDebugLLog(@"NSEvent", @"%d VisibilityNotify %d\n",
|
||||
NSDebugLLog(@"NSEvent", @"%lu VisibilityNotify %d\n",
|
||||
xEvent.xvisibility.window, xEvent.xvisibility.state);
|
||||
if (cWin == 0 || xEvent.xvisibility.window != cWin->ident)
|
||||
{
|
||||
|
@ -995,7 +995,7 @@ posixFileDescriptor: (NSPosixFileDescriptor*)fileDescriptor
|
|||
// a portion of the window has become visible and
|
||||
// we must redisplay it
|
||||
case Expose:
|
||||
NSDebugLLog(@"NSEvent", @"%d Expose\n",
|
||||
NSDebugLLog(@"NSEvent", @"%lu Expose\n",
|
||||
xEvent.xexpose.window);
|
||||
{
|
||||
BOOL isSubWindow = NO;
|
||||
|
@ -1075,7 +1075,7 @@ posixFileDescriptor: (NSPosixFileDescriptor*)fileDescriptor
|
|||
|
||||
// keyboard focus entered a window
|
||||
case FocusIn:
|
||||
NSDebugLLog(@"NSEvent", @"%d FocusIn\n",
|
||||
NSDebugLLog(@"NSEvent", @"%lu FocusIn\n",
|
||||
xEvent.xfocus.window);
|
||||
if (cWin == 0 || xEvent.xfocus.window != cWin->ident)
|
||||
{
|
||||
|
@ -1084,7 +1084,7 @@ posixFileDescriptor: (NSPosixFileDescriptor*)fileDescriptor
|
|||
}
|
||||
if (cWin == 0)
|
||||
break;
|
||||
NSDebugLLog(@"Focus", @"%d got focus on %d\n",
|
||||
NSDebugLLog(@"Focus", @"%lu got focus on %lu\n",
|
||||
xEvent.xfocus.window, cWin->number);
|
||||
// Store this for debugging, may not be the real focus window
|
||||
generic.currentFocusWindow = cWin->number;
|
||||
|
@ -1113,7 +1113,7 @@ posixFileDescriptor: (NSPosixFileDescriptor*)fileDescriptor
|
|||
* If it has gone to a window - we see if it is one of ours.
|
||||
*/
|
||||
XGetInputFocus(xEvent.xfocus.display, &fw, &rev);
|
||||
NSDebugLLog(@"NSEvent", @"%d FocusOut\n",
|
||||
NSDebugLLog(@"NSEvent", @"%lu FocusOut\n",
|
||||
xEvent.xfocus.window);
|
||||
if (fw != None && fw != PointerRoot)
|
||||
{
|
||||
|
@ -1135,7 +1135,7 @@ posixFileDescriptor: (NSPosixFileDescriptor*)fileDescriptor
|
|||
{
|
||||
nswin = nil;
|
||||
}
|
||||
NSDebugLLog(@"Focus", @"Focus went to %d (xwin %d)\n",
|
||||
NSDebugLLog(@"Focus", @"Focus went to %lu (xwin %lu)\n",
|
||||
(nswin != nil) ? cWin->number : 0, fw);
|
||||
|
||||
// Focus went to a window not in this application.
|
||||
|
@ -1147,7 +1147,7 @@ posixFileDescriptor: (NSPosixFileDescriptor*)fileDescriptor
|
|||
// Clean up old focus request
|
||||
generic.cachedWindow
|
||||
= [XGServer _windowForXWindow: xEvent.xfocus.window];
|
||||
NSDebugLLog(@"Focus", @"%d lost focus on %d\n",
|
||||
NSDebugLLog(@"Focus", @"%lu lost focus on %lu\n",
|
||||
xEvent.xfocus.window, (cWin) ? cWin->number : 0);
|
||||
generic.currentFocusWindow = 0;
|
||||
if (cWin && generic.desiredFocusWindow == cWin->number)
|
||||
|
@ -1159,7 +1159,7 @@ posixFileDescriptor: (NSPosixFileDescriptor*)fileDescriptor
|
|||
break;
|
||||
|
||||
case GraphicsExpose:
|
||||
NSDebugLLog(@"NSEvent", @"%d GraphicsExpose\n",
|
||||
NSDebugLLog(@"NSEvent", @"%lu GraphicsExpose\n",
|
||||
xEvent.xexpose.window);
|
||||
break;
|
||||
|
||||
|
@ -1169,13 +1169,13 @@ posixFileDescriptor: (NSPosixFileDescriptor*)fileDescriptor
|
|||
|
||||
// window is moved because of a change in the size of its parent
|
||||
case GravityNotify:
|
||||
NSDebugLLog(@"NSEvent", @"%d GravityNotify\n",
|
||||
NSDebugLLog(@"NSEvent", @"%lu GravityNotify\n",
|
||||
xEvent.xgravity.window);
|
||||
break;
|
||||
|
||||
// a key has been pressed
|
||||
case KeyPress:
|
||||
NSDebugLLog(@"NSEvent", @"%d KeyPress\n",
|
||||
NSDebugLLog(@"NSEvent", @"%lu KeyPress\n",
|
||||
xEvent.xkey.window);
|
||||
[self setLastTime: xEvent.xkey.time];
|
||||
e = process_key_event (&xEvent, self, NSKeyDown, event_queue);
|
||||
|
@ -1183,7 +1183,7 @@ posixFileDescriptor: (NSPosixFileDescriptor*)fileDescriptor
|
|||
|
||||
// a key has been released
|
||||
case KeyRelease:
|
||||
NSDebugLLog(@"NSEvent", @"%d KeyRelease\n",
|
||||
NSDebugLLog(@"NSEvent", @"%lu KeyRelease\n",
|
||||
xEvent.xkey.window);
|
||||
[self setLastTime: xEvent.xkey.time];
|
||||
e = process_key_event (&xEvent, self, NSKeyUp, event_queue);
|
||||
|
@ -1196,7 +1196,7 @@ posixFileDescriptor: (NSPosixFileDescriptor*)fileDescriptor
|
|||
if (_is_keyboard_initialized == NO)
|
||||
initialize_keyboard ();
|
||||
|
||||
NSDebugLLog(@"NSEvent", @"%d KeymapNotify\n",
|
||||
NSDebugLLog(@"NSEvent", @"%lu KeymapNotify\n",
|
||||
xEvent.xkeymap.window);
|
||||
|
||||
// Check if shift is pressed
|
||||
|
@ -1267,7 +1267,7 @@ posixFileDescriptor: (NSPosixFileDescriptor*)fileDescriptor
|
|||
// when a window changes state from ummapped to
|
||||
// mapped or vice versa
|
||||
case MapNotify:
|
||||
NSDebugLLog(@"NSEvent", @"%d MapNotify\n",
|
||||
NSDebugLLog(@"NSEvent", @"%lu MapNotify\n",
|
||||
xEvent.xmap.window);
|
||||
if (cWin == 0 || xEvent.xmap.window != cWin->ident)
|
||||
{
|
||||
|
@ -1284,7 +1284,7 @@ posixFileDescriptor: (NSPosixFileDescriptor*)fileDescriptor
|
|||
if (generic.desiredFocusWindow == cWin->number
|
||||
&& generic.focusRequestNumber == 0)
|
||||
{
|
||||
NSDebugLLog(@"Focus", @"Refocusing %d on map notify",
|
||||
NSDebugLLog(@"Focus", @"Refocusing %lu on map notify",
|
||||
cWin->number);
|
||||
[self setinputfocus: cWin->number];
|
||||
}
|
||||
|
@ -1298,7 +1298,7 @@ posixFileDescriptor: (NSPosixFileDescriptor*)fileDescriptor
|
|||
|
||||
// Window is no longer visible.
|
||||
case UnmapNotify:
|
||||
NSDebugLLog(@"NSEvent", @"%d UnmapNotify\n",
|
||||
NSDebugLLog(@"NSEvent", @"%lu UnmapNotify\n",
|
||||
xEvent.xunmap.window);
|
||||
if (cWin == 0 || xEvent.xunmap.window != cWin->ident)
|
||||
{
|
||||
|
@ -1314,13 +1314,13 @@ posixFileDescriptor: (NSPosixFileDescriptor*)fileDescriptor
|
|||
|
||||
// like MapNotify but occurs before the request is carried out
|
||||
case MapRequest:
|
||||
NSDebugLLog(@"NSEvent", @"%d MapRequest\n",
|
||||
NSDebugLLog(@"NSEvent", @"%lu MapRequest\n",
|
||||
xEvent.xmaprequest.window);
|
||||
break;
|
||||
|
||||
// keyboard or mouse mapping has been changed by another client
|
||||
case MappingNotify:
|
||||
NSDebugLLog(@"NSEvent", @"%d MappingNotify\n",
|
||||
NSDebugLLog(@"NSEvent", @"%lu MappingNotify\n",
|
||||
xEvent.xmapping.window);
|
||||
if ((xEvent.xmapping.request == MappingModifier)
|
||||
|| (xEvent.xmapping.request == MappingKeyboard))
|
||||
|
@ -1331,7 +1331,7 @@ posixFileDescriptor: (NSPosixFileDescriptor*)fileDescriptor
|
|||
break;
|
||||
|
||||
case MotionNotify:
|
||||
NSDebugLLog(@"NSMotionEvent", @"%d MotionNotify - %d %d\n",
|
||||
NSDebugLLog(@"NSMotionEvent", @"%lu MotionNotify - %d %d\n",
|
||||
xEvent.xmotion.window, xEvent.xmotion.x, xEvent.xmotion.y);
|
||||
{
|
||||
unsigned int state;
|
||||
|
@ -1411,7 +1411,7 @@ posixFileDescriptor: (NSPosixFileDescriptor*)fileDescriptor
|
|||
|
||||
// a window property has changed or been deleted
|
||||
case PropertyNotify:
|
||||
NSDebugLLog(@"NSEvent", @"%d PropertyNotify - '%s'\n",
|
||||
NSDebugLLog(@"NSEvent", @"%lu PropertyNotify - '%s'\n",
|
||||
xEvent.xproperty.window,
|
||||
XGetAtomName(dpy, xEvent.xproperty.atom));
|
||||
if (xEvent.xproperty.atom == generic.wm_state_atom)
|
||||
|
@ -1451,7 +1451,7 @@ posixFileDescriptor: (NSPosixFileDescriptor*)fileDescriptor
|
|||
/* Same event as when we get ClientMessage with the
|
||||
* atom equal to generic.miniaturize_atom
|
||||
*/
|
||||
NSDebugLLog(@"Miniaturize", @"%d miniaturized",
|
||||
NSDebugLLog(@"Miniaturize", @"%lu miniaturized",
|
||||
cWin->number);
|
||||
eventLocation = NSMakePoint(0,0);
|
||||
e = [NSEvent otherEventWithType: NSAppKitDefined
|
||||
|
@ -1473,7 +1473,7 @@ posixFileDescriptor: (NSPosixFileDescriptor*)fileDescriptor
|
|||
if (cWin->wm_state == IconicState &&
|
||||
[GSWindowWithNumber(cWin->number) isMiniaturized])
|
||||
{
|
||||
NSDebugLLog(@"Miniaturize", @"%d deminiaturized",
|
||||
NSDebugLLog(@"Miniaturize", @"%lu deminiaturized",
|
||||
cWin->number);
|
||||
eventLocation = NSMakePoint(0,0);
|
||||
e = [NSEvent otherEventWithType: NSAppKitDefined
|
||||
|
@ -1497,7 +1497,7 @@ posixFileDescriptor: (NSPosixFileDescriptor*)fileDescriptor
|
|||
|
||||
// a client successfully reparents a window
|
||||
case ReparentNotify:
|
||||
NSDebugLLog(@"NSEvent", @"%d ReparentNotify - offset %d %d\n",
|
||||
NSDebugLLog(@"NSEvent", @"%lu ReparentNotify - offset %d %d\n",
|
||||
xEvent.xreparent.window, xEvent.xreparent.x,
|
||||
xEvent.xreparent.y);
|
||||
if (cWin == 0 || xEvent.xreparent.window != cWin->ident)
|
||||
|
@ -1563,8 +1563,8 @@ posixFileDescriptor: (NSPosixFileDescriptor*)fileDescriptor
|
|||
unsigned int nchildren;
|
||||
|
||||
parent = new_parent;
|
||||
NSLog(@"QueryTree window is %d (root %d cwin root %d)",
|
||||
parent, root, cWin->root);
|
||||
NSLog(@"QueryTree window is %lu (cwin root %lu)",
|
||||
parent, cWin->root);
|
||||
if (!XQueryTree(dpy, parent, &root, &new_parent,
|
||||
&children, &nchildren))
|
||||
{
|
||||
|
@ -1664,23 +1664,23 @@ posixFileDescriptor: (NSPosixFileDescriptor*)fileDescriptor
|
|||
|
||||
// another client attempts to change the size of a window
|
||||
case ResizeRequest:
|
||||
NSDebugLLog(@"NSEvent", @"%d ResizeRequest\n",
|
||||
NSDebugLLog(@"NSEvent", @"%lu ResizeRequest\n",
|
||||
xEvent.xresizerequest.window);
|
||||
break;
|
||||
|
||||
// events dealing with the selection
|
||||
case SelectionClear:
|
||||
NSDebugLLog(@"NSEvent", @"%d SelectionClear\n",
|
||||
NSDebugLLog(@"NSEvent", @"%lu SelectionClear\n",
|
||||
xEvent.xselectionclear.window);
|
||||
break;
|
||||
|
||||
case SelectionNotify:
|
||||
NSDebugLLog(@"NSEvent", @"%d SelectionNotify\n",
|
||||
NSDebugLLog(@"NSEvent", @"%lu SelectionNotify\n",
|
||||
xEvent.xselection.requestor);
|
||||
break;
|
||||
|
||||
case SelectionRequest:
|
||||
NSDebugLLog(@"NSEvent", @"%d SelectionRequest\n",
|
||||
NSDebugLLog(@"NSEvent", @"%lu SelectionRequest\n",
|
||||
xEvent.xselectionrequest.requestor);
|
||||
{
|
||||
NSPasteboard *pb = [NSPasteboard pasteboardWithName: NSDragPboard];
|
||||
|
@ -1757,7 +1757,7 @@ posixFileDescriptor: (NSPosixFileDescriptor*)fileDescriptor
|
|||
NSEvent *e = nil;
|
||||
key_win = [NSApp keyWindow];
|
||||
key_num = [key_win windowNumber];
|
||||
NSDebugLLog(@"Focus", @"take focus:%d (current=%d key=%d)",
|
||||
NSDebugLLog(@"Focus", @"take focus:%lu (current=%lu key=%d)",
|
||||
cWin->number, generic.currentFocusWindow, key_num);
|
||||
|
||||
/* Sometimes window managers lose the setinputfocus on the key window
|
||||
|
@ -2128,7 +2128,7 @@ process_key_event (XEvent* xEvent, XGServer* context, NSEventType eventType,
|
|||
if (IsKeypadKey (keysym))
|
||||
eventFlags = eventFlags | NSNumericPadKeyMask;
|
||||
|
||||
NSDebugLLog (@"NSKeyEvent", @"keysym=%d, keyCode=%d flags=%d (state=%d)",
|
||||
NSDebugLLog (@"NSKeyEvent", @"keysym=%lu, keyCode=%d flags=%d (state=%d)",
|
||||
keysym, keyCode, eventFlags, ((XKeyEvent *)xEvent)->state);
|
||||
|
||||
/* Add NSFunctionKeyMask if the key is a function or a misc function key */
|
||||
|
|
|
@ -195,19 +195,19 @@ static void
|
|||
setNormalHints(Display *d, gswindow_device_t *w)
|
||||
{
|
||||
if (w->siz_hints.flags & (USPosition | PPosition))
|
||||
NSDebugLLog(@"XGTrace", @"Hint posn %d: %d, %d",
|
||||
NSDebugLLog(@"XGTrace", @"Hint posn %lu: %d, %d",
|
||||
w->number, w->siz_hints.x, w->siz_hints.y);
|
||||
if (w->siz_hints.flags & (USSize | PSize))
|
||||
NSDebugLLog(@"XGTrace", @"Hint size %d: %d, %d",
|
||||
NSDebugLLog(@"XGTrace", @"Hint size %lu: %d, %d",
|
||||
w->number, w->siz_hints.width, w->siz_hints.height);
|
||||
if (w->siz_hints.flags & PMinSize)
|
||||
NSDebugLLog(@"XGTrace", @"Hint mins %d: %d, %d",
|
||||
NSDebugLLog(@"XGTrace", @"Hint mins %lu: %d, %d",
|
||||
w->number, w->siz_hints.min_width, w->siz_hints.min_height);
|
||||
if (w->siz_hints.flags & PMaxSize)
|
||||
NSDebugLLog(@"XGTrace", @"Hint maxs %d: %d, %d",
|
||||
NSDebugLLog(@"XGTrace", @"Hint maxs %lu: %d, %d",
|
||||
w->number, w->siz_hints.max_width, w->siz_hints.max_height);
|
||||
if (w->siz_hints.flags & PResizeInc)
|
||||
NSDebugLLog(@"XGTrace", @"Hint incr %d: %d, %d",
|
||||
NSDebugLLog(@"XGTrace", @"Hint incr %lu: %d, %d",
|
||||
w->number, w->siz_hints.width_inc, w->siz_hints.height_inc);
|
||||
if (handlesWindowDecorations
|
||||
&& !(w->win_attrs.window_style & NSResizableWindowMask))
|
||||
|
@ -490,7 +490,7 @@ static void setWindowHintsForStyle (Display *dpy, Window window,
|
|||
x.origin.x = o.origin.x + l;
|
||||
x.origin.y = o.origin.y + o.size.height - t;
|
||||
x.origin.y = DisplayHeight(dpy, win->screen) - x.origin.y;
|
||||
NSDebugLLog(@"Frame", @"O2X %d, %x, %@, %@", win->number, style,
|
||||
NSDebugLLog(@"Frame", @"O2X %lu, %x, %@, %@", win->number, style,
|
||||
NSStringFromRect(o), NSStringFromRect(x));
|
||||
return x;
|
||||
}
|
||||
|
@ -515,7 +515,7 @@ static void setWindowHintsForStyle (Display *dpy, Window window,
|
|||
x.origin.x = o.origin.x;
|
||||
x.origin.y = o.origin.y + o.size.height;
|
||||
x.origin.y = DisplayHeight(dpy, win->screen) - x.origin.y;
|
||||
NSDebugLLog(@"Frame", @"O2H %d, %x, %@, %@", win->number, style,
|
||||
NSDebugLLog(@"Frame", @"O2H %lu, %x, %@, %@", win->number, style,
|
||||
NSStringFromRect(o), NSStringFromRect(x));
|
||||
return x;
|
||||
}
|
||||
|
@ -562,7 +562,7 @@ static void setWindowHintsForStyle (Display *dpy, Window window,
|
|||
o.size.width += l + r;
|
||||
o.size.height += t + b;
|
||||
|
||||
NSDebugLLog(@"Frame", @"X2O %d, %x, %@, %@", win->number, style,
|
||||
NSDebugLLog(@"Frame", @"X2O %lu, %x, %@, %@", win->number, style,
|
||||
NSStringFromRect(x), NSStringFromRect(o));
|
||||
return o;
|
||||
}
|
||||
|
@ -588,7 +588,7 @@ static void setWindowHintsForStyle (Display *dpy, Window window,
|
|||
x.size.height = o.size.height;
|
||||
x.origin.x = o.origin.x - l;
|
||||
x.origin.y = o.origin.y - t;
|
||||
NSDebugLLog(@"Frame", @"X2H %d, %x, %@, %@", win->number, style,
|
||||
NSDebugLLog(@"Frame", @"X2H %lu, %x, %@, %@", win->number, style,
|
||||
NSStringFromRect(o), NSStringFromRect(x));
|
||||
return x;
|
||||
}
|
||||
|
@ -944,7 +944,7 @@ _get_next_prop_new_event(Display *display, XEvent *event, char *arg)
|
|||
}
|
||||
}
|
||||
XNextEvent(dpy, &xEvent);
|
||||
NSDebugLLog(@"Offset", @"Testing ... event %d window %d\n",
|
||||
NSDebugLLog(@"Offset", @"Testing ... event %d window %lu\n",
|
||||
xEvent.type, xEvent.xany.window);
|
||||
if (xEvent.xany.window != window->ident)
|
||||
{
|
||||
|
@ -957,7 +957,7 @@ _get_next_prop_new_event(Display *display, XEvent *event, char *arg)
|
|||
break;
|
||||
|
||||
case ReparentNotify:
|
||||
NSDebugLLog(@"Offset", @"%d ReparentNotify - offset %d %d\n",
|
||||
NSDebugLLog(@"Offset", @"%lu ReparentNotify - offset %d %d\n",
|
||||
xEvent.xreparent.window, xEvent.xreparent.x,
|
||||
xEvent.xreparent.y);
|
||||
repp = xEvent.xreparent.parent;
|
||||
|
@ -1017,7 +1017,7 @@ _get_next_prop_new_event(Display *display, XEvent *event, char *arg)
|
|||
o->t = extents[2];
|
||||
o->b = extents[3];
|
||||
o->known = YES;
|
||||
NSDebugLLog(@"Offset", @"Extents left %d, right %d, top %d, bottom %d",
|
||||
NSDebugLLog(@"Offset", @"Extents left %lu, right %lu, top %lu, bottom %lu",
|
||||
extents[0], extents[1], extents[2], extents[3]);
|
||||
XFree(extents);
|
||||
}
|
||||
|
@ -1070,7 +1070,7 @@ _get_next_prop_new_event(Display *display, XEvent *event, char *arg)
|
|||
parent = new_parent;
|
||||
repx = wattr.x;
|
||||
repy = wattr.y;
|
||||
NSLog(@"QueryTree window is %d (root %d cwin root %d)",
|
||||
NSLog(@"QueryTree window is %lu (root %lu cwin root %lu)",
|
||||
parent, root, window->root);
|
||||
if (!XQueryTree(dpy, parent, &root, &new_parent,
|
||||
&children, &nchildren))
|
||||
|
@ -1120,7 +1120,7 @@ _get_next_prop_new_event(Display *display, XEvent *event, char *arg)
|
|||
while (XPending(dpy) > 0)
|
||||
{
|
||||
XNextEvent(dpy, &xEvent);
|
||||
NSDebugLLog(@"Offset", @"Destroying ... event %d window %d\n",
|
||||
NSDebugLLog(@"Offset", @"Destroying ... event %d window %lu\n",
|
||||
xEvent.type, xEvent.xany.window);
|
||||
if (xEvent.xany.window != window->ident)
|
||||
{
|
||||
|
@ -2122,7 +2122,7 @@ _get_next_prop_new_event(Display *display, XEvent *event, char *arg)
|
|||
NSRect xframe;
|
||||
|
||||
windowRef = *((Window*)winref);
|
||||
NSDebugLLog(@"XGTrace", @"nativeWindow: %d", windowRef);
|
||||
NSDebugLLog(@"XGTrace", @"nativeWindow: %lu", windowRef);
|
||||
if (!XGetWindowAttributes(dpy, windowRef, &win_attributes))
|
||||
{
|
||||
return 0;
|
||||
|
@ -2324,7 +2324,7 @@ _get_next_prop_new_event(Display *display, XEvent *event, char *arg)
|
|||
if (extents)
|
||||
{
|
||||
NSDebugLLog(@"Frame",
|
||||
@"Window %d, left %d, right %d, top %d, bottom %d",
|
||||
@"Window %lu, left %lu, right %lu, top %lu, bottom %lu",
|
||||
win, extents[0], extents[1], extents[2], extents[3]);
|
||||
*l = extents[0];
|
||||
*r = extents[1];
|
||||
|
@ -2353,7 +2353,7 @@ _get_next_prop_new_event(Display *display, XEvent *event, char *arg)
|
|||
*b = o->b;
|
||||
*t = o->t;
|
||||
NSDebugLLog(@"Frame",
|
||||
@"Window %d, offsets %f, %f, %f, %f",
|
||||
@"Window %lu, offsets %f, %f, %f, %f",
|
||||
win, *l, *r, *t, *b);
|
||||
return;
|
||||
}
|
||||
|
@ -2373,7 +2373,7 @@ NSLog(@"styleoffsets ... guessing offsets\n");
|
|||
*t = 25.0;
|
||||
}
|
||||
NSDebugLLog(@"Frame",
|
||||
@"Window %d, windowmaker %f, %f, %f, %f",
|
||||
@"Window %lu, windowmaker %f, %f, %f, %f",
|
||||
win, *l, *r, *t, *b);
|
||||
}
|
||||
else if ((generic.wm & XGWM_EWMH) != 0)
|
||||
|
@ -2389,7 +2389,7 @@ NSLog(@"styleoffsets ... guessing offsets\n");
|
|||
*t = 20;
|
||||
}
|
||||
NSDebugLLog(@"Frame",
|
||||
@"Window %d, EWMH %f, %f, %f, %f",
|
||||
@"Window %lu, EWMH %f, %f, %f, %f",
|
||||
win, *l, *r, *t, *b);
|
||||
}
|
||||
else
|
||||
|
@ -2401,7 +2401,7 @@ NSLog(@"styleoffsets ... guessing offsets\n");
|
|||
*/
|
||||
*l = *r = *t = *b = 0.0;
|
||||
NSDebugLLog(@"Frame",
|
||||
@"Window %d, unknown %f, %f, %f, %f",
|
||||
@"Window %lu, unknown %f, %f, %f, %f",
|
||||
win, *l, *r, *t, *b);
|
||||
}
|
||||
}
|
||||
|
@ -2825,7 +2825,7 @@ static BOOL didCreatePixmaps;
|
|||
gen_hints.flags |= IconPixmapHint;
|
||||
gen_hints.icon_pixmap = xIconPixmap;
|
||||
}
|
||||
if (xIconMask);
|
||||
if (xIconMask)
|
||||
{
|
||||
gen_hints.flags |= IconMaskHint;
|
||||
gen_hints.icon_mask = xIconMask;
|
||||
|
@ -3128,7 +3128,7 @@ static BOOL didCreatePixmaps;
|
|||
window->siz_hints.x = (int)xHint.origin.x;
|
||||
window->siz_hints.y = (int)xHint.origin.y;
|
||||
|
||||
NSDebugLLog(@"Moving", @"Place %d - o:%@, x:%@", window->number,
|
||||
NSDebugLLog(@"Moving", @"Place %lu - o:%@, x:%@", window->number,
|
||||
NSStringFromRect(rect), NSStringFromRect(xVal));
|
||||
XMoveResizeWindow (dpy, window->ident,
|
||||
window->siz_hints.x, window->siz_hints.y,
|
||||
|
@ -3148,7 +3148,7 @@ static BOOL didCreatePixmaps;
|
|||
|
||||
if (resize == YES)
|
||||
{
|
||||
NSDebugLLog(@"Moving", @"Fake size %d - %@", window->number,
|
||||
NSDebugLLog(@"Moving", @"Fake size %lu - %@", window->number,
|
||||
NSStringFromSize(rect.size));
|
||||
e = [NSEvent otherEventWithType: NSAppKitDefined
|
||||
location: rect.origin
|
||||
|
@ -3163,7 +3163,7 @@ static BOOL didCreatePixmaps;
|
|||
}
|
||||
else if (move == YES)
|
||||
{
|
||||
NSDebugLLog(@"Moving", @"Fake move %d - %@", window->number,
|
||||
NSDebugLLog(@"Moving", @"Fake move %lu - %@", window->number,
|
||||
NSStringFromPoint(rect.origin));
|
||||
e = [NSEvent otherEventWithType: NSAppKitDefined
|
||||
location: NSZeroPoint
|
||||
|
@ -3731,7 +3731,7 @@ static BOOL didCreatePixmaps;
|
|||
*/
|
||||
if (win == generic.desiredFocusWindow && generic.focusRequestNumber != 0)
|
||||
{
|
||||
NSDebugLLog(@"Focus", @"Focus already set on %d", window->number);
|
||||
NSDebugLLog(@"Focus", @"Focus already set on %lu", window->number);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -3745,12 +3745,12 @@ static BOOL didCreatePixmaps;
|
|||
user_time_atom = XInternAtom(dpy, "_NET_WM_USER_TIME", False);
|
||||
}
|
||||
|
||||
NSDebugLLog(@"Focus", @"Setting user time for %d to %ul", window->ident, last);
|
||||
NSDebugLLog(@"Focus", @"Setting user time for %lu to %lu", window->ident, last);
|
||||
XChangeProperty(dpy, window->ident, user_time_atom, XA_CARDINAL, 32,
|
||||
PropModeReplace, (unsigned char *)&last, 1);
|
||||
}
|
||||
|
||||
NSDebugLLog(@"Focus", @"Setting focus to %d", window->number);
|
||||
NSDebugLLog(@"Focus", @"Setting focus to %lu", window->number);
|
||||
generic.desiredFocusWindow = win;
|
||||
generic.focusRequestNumber = XNextRequest(dpy);
|
||||
XSetInputFocus(dpy, window->ident, RevertToParent, [self lastTime]);
|
||||
|
@ -3983,7 +3983,7 @@ static BOOL cursor_hidden = NO;
|
|||
gswindow_device_t *d;
|
||||
Window root;
|
||||
|
||||
NSDebugLLog (@"NSCursor", @"_DPSsetcursor: cursor = %p, set = %d", c, set);
|
||||
NSDebugLLog (@"NSCursor", @"_DPSsetcursor: cursor = %lu, set = %d", c, set);
|
||||
|
||||
root = DefaultRootWindow(dpy);
|
||||
enumerator = NSEnumerateMapTable (windowmaps);
|
||||
|
|
|
@ -279,8 +279,8 @@
|
|||
}
|
||||
else
|
||||
{
|
||||
NSLog(@"XIM: Unknown style '%s'.\n"
|
||||
@"Fallback to RootWindow style.", [request cString]);
|
||||
NSLog(@"XIM: Unknown style '%@'.\n"
|
||||
@"Fallback to RootWindow style.", request);
|
||||
xim_requested_style = RootWindowStyle;
|
||||
}
|
||||
|
||||
|
@ -301,7 +301,7 @@
|
|||
return 1;
|
||||
}
|
||||
}
|
||||
NSLog(@"XIM: '%s' is not supported", request);
|
||||
NSLog(@"XIM: '%@' is not supported", request);
|
||||
XFree(styles);
|
||||
return 0;
|
||||
}
|
||||
|
@ -344,7 +344,7 @@
|
|||
/* Now set focus to this window */
|
||||
if (windev->ic)
|
||||
{
|
||||
NSDebugLLog(@"XIM", @"XSetICFocus to window %p",
|
||||
NSDebugLLog(@"XIM", @"XSetICFocus to window %lu",
|
||||
windev->ident);
|
||||
XSetICFocus(windev->ic);
|
||||
}
|
||||
|
|
|
@ -52,9 +52,6 @@ static int use_xshm = 1;
|
|||
static Bool use_xshm_pixmaps = 0;
|
||||
static int num_xshm_test_errors = 0;
|
||||
|
||||
static NSString *xshm_warning
|
||||
= @"Falling back to normal XImage: s (will be slower).";
|
||||
|
||||
static int test_xshm_error_handler(Display *d, XErrorEvent *ev)
|
||||
{
|
||||
num_xshm_test_errors++;
|
||||
|
@ -84,7 +81,7 @@ static void test_xshm(Display *display, Visual *visual, int drawing_depth)
|
|||
!XShmQueryVersion(display, &major, &minor, &use_xshm_pixmaps))
|
||||
{
|
||||
NSLog(@"XShm not supported by X server.");
|
||||
NSLog(xshm_warning);
|
||||
NSLog(@"Falling back to normal XImage (will be slower).");
|
||||
use_xshm = 0;
|
||||
return;
|
||||
}
|
||||
|
@ -164,7 +161,7 @@ static void test_xshm(Display *display, Visual *visual, int drawing_depth)
|
|||
{
|
||||
NSLog(@"XShm not supported.");
|
||||
no_xshm:
|
||||
NSLog(xshm_warning);
|
||||
NSLog(@"Falling back to normal XImage (will be slower).");
|
||||
use_xshm = 0;
|
||||
}
|
||||
XSetErrorHandler(old_error_handler);
|
||||
|
@ -201,8 +198,8 @@ no_xshm:
|
|||
sizeof(XWindowBuffer *) * (num_window_buffers + 1));
|
||||
if (!window_buffers)
|
||||
{
|
||||
NSLog(@"Out of memory (failed to allocate %i bytes)",
|
||||
sizeof(XWindowBuffer *) * (num_window_buffers + 1));
|
||||
NSLog(@"Out of memory (failed to allocate %lu bytes)",
|
||||
(unsigned long)sizeof(XWindowBuffer *) * (num_window_buffers + 1));
|
||||
exit(1);
|
||||
}
|
||||
window_buffers[num_window_buffers++] = wi;
|
||||
|
@ -308,7 +305,7 @@ no_xshm:
|
|||
if (!wi->ximage)
|
||||
{
|
||||
NSLog(@"Warning: XShmCreateImage failed!");
|
||||
NSLog(xshm_warning);
|
||||
NSLog(@"Falling back to normal XImage (will be slower).");
|
||||
goto no_xshm;
|
||||
}
|
||||
wi->shminfo.shmid = shmget(IPC_PRIVATE,
|
||||
|
@ -318,7 +315,7 @@ no_xshm:
|
|||
if (wi->shminfo.shmid == -1)
|
||||
{
|
||||
NSLog(@"Warning: shmget() failed: %m.");
|
||||
NSLog(xshm_warning);
|
||||
NSLog(@"Falling back to normal XImage (will be slower).");
|
||||
XDestroyImage(wi->ximage);
|
||||
goto no_xshm;
|
||||
}
|
||||
|
@ -327,7 +324,7 @@ no_xshm:
|
|||
if ((intptr_t)wi->shminfo.shmaddr == -1)
|
||||
{
|
||||
NSLog(@"Warning: shmat() failed: %m.");
|
||||
NSLog(xshm_warning);
|
||||
NSLog(@"Falling back to normal XImage (will be slower).");
|
||||
XDestroyImage(wi->ximage);
|
||||
shmctl(wi->shminfo.shmid, IPC_RMID, 0);
|
||||
goto no_xshm;
|
||||
|
@ -337,7 +334,7 @@ no_xshm:
|
|||
if (!XShmAttach(wi->display, &wi->shminfo))
|
||||
{
|
||||
NSLog(@"Warning: XShmAttach() failed.");
|
||||
NSLog(xshm_warning);
|
||||
NSLog(@"Falling back to normal XImage (will be slower).");
|
||||
XDestroyImage(wi->ximage);
|
||||
shmdt(wi->shminfo.shmaddr);
|
||||
shmctl(wi->shminfo.shmid, IPC_RMID, 0);
|
||||
|
|
|
@ -886,7 +886,7 @@ xErrorHandler(Display *d, XErrorEvent *e)
|
|||
|
||||
if ([self waitingForSelection] > xEvent->time)
|
||||
{
|
||||
NSDebugLLog(@"Pbs", @"Unexpected selection notify - time %u.", xEvent->time);
|
||||
NSDebugLLog(@"Pbs", @"Unexpected selection notify - time %lu.", xEvent->time);
|
||||
return;
|
||||
}
|
||||
[self setWaitingForSelection: 0];
|
||||
|
|
Loading…
Reference in a new issue