Fix GNUstep build
* src/nsterm.h [NS_IMPL_GNUSTEP]: Add typedefs for Cocoa-only types. (NSWindowStyleMaskUtilityWindow): #define to NSUtilityWindowMask in GNUstep and old versions of macOS. * src/nsfns.m (ns-set-mouse-absolute-pixel-position): Function only works in cocoa, not GNUstep.
This commit is contained in:
parent
107e60f49d
commit
4a485410ce
2 changed files with 12 additions and 0 deletions
|
@ -3046,6 +3046,9 @@ value is a list of the form (LEFT, TOP, RIGHT, BOTTOM). All values are
|
|||
\(0, 0) of the selected frame's display. */)
|
||||
(Lisp_Object x, Lisp_Object y)
|
||||
{
|
||||
#ifdef NS_IMPL_COCOA
|
||||
/* GNUstep doesn't support CGWarpMouseCursorPosition, so none of
|
||||
this will work. */
|
||||
struct frame *f = SELECTED_FRAME ();
|
||||
EmacsView *view = FRAME_NS_VIEW (f);
|
||||
NSScreen *screen = [[view window] screen];
|
||||
|
@ -3072,6 +3075,7 @@ value is a list of the form (LEFT, TOP, RIGHT, BOTTOM). All values are
|
|||
|
||||
CGPoint mouse_pos = CGPointMake(mouse_x, mouse_y);
|
||||
CGWarpMouseCursorPosition (mouse_pos);
|
||||
#endif /* NS_IMPL_COCOA */
|
||||
|
||||
return Qnil;
|
||||
}
|
||||
|
|
|
@ -62,6 +62,13 @@ typedef CGFloat EmacsCGFloat;
|
|||
typedef float EmacsCGFloat;
|
||||
#endif
|
||||
|
||||
/* FIXME: It looks as though instancetype will be supported in GNUstep
|
||||
at some point, but I'm not sure what version. */
|
||||
#ifdef NS_IMPL_GNUSTEP
|
||||
typedef id instancetype;
|
||||
typedef int NSWindowStyleMask;
|
||||
#endif
|
||||
|
||||
/* ==========================================================================
|
||||
|
||||
Trace support
|
||||
|
@ -1290,6 +1297,7 @@ extern char gnustep_base_version[]; /* version tracking */
|
|||
#define NSWindowStyleMaskMiniaturizable NSMiniaturizableWindowMask
|
||||
#define NSWindowStyleMaskResizable NSResizableWindowMask
|
||||
#define NSWindowStyleMaskTitled NSTitledWindowMask
|
||||
#define NSWindowStyleMaskUtilityWindow NSUtilityWindowMask
|
||||
#define NSAlertStyleCritical NSCriticalAlertStyle
|
||||
#define NSControlSizeRegular NSRegularControlSize
|
||||
#endif
|
||||
|
|
Loading…
Add table
Reference in a new issue