XQuartz: Moved some rootless-specific cruft into xpr
This commit is contained in:
parent
7b087c965b
commit
31625cc03b
|
@ -69,10 +69,8 @@ in this Software without prior written authorization from The Open Group.
|
|||
#include "applewmExt.h"
|
||||
#include <X11/extensions/applewm.h>
|
||||
|
||||
/* FIXME: Abstract this away into xpr */
|
||||
#include <Xplugin.h>
|
||||
#include "rootlessWindow.h"
|
||||
WindowPtr xprGetXWindow(xp_window_id wid);
|
||||
/* FIXME: Abstract this better */
|
||||
void QuartzModeEQInit(void);
|
||||
|
||||
int input_check_zero, input_check_flag;
|
||||
|
||||
|
@ -218,7 +216,7 @@ static void DarwinSimulateMouseClick(
|
|||
be moved into their own individual functions and set as handlers using
|
||||
mieqSetHandler. */
|
||||
|
||||
void DarwinEventHandler(int screenNum, xEventPtr xe, DeviceIntPtr dev, int nevents) {
|
||||
static void DarwinEventHandler(int screenNum, xEventPtr xe, DeviceIntPtr dev, int nevents) {
|
||||
int i;
|
||||
|
||||
TA_SERVER();
|
||||
|
@ -259,18 +257,7 @@ void DarwinEventHandler(int screenNum, xEventPtr xe, DeviceIntPtr dev, int neven
|
|||
AppleWMIsInactive, 0);
|
||||
QuartzHide();
|
||||
break;
|
||||
|
||||
case kXquartzWindowState:
|
||||
DEBUG_LOG("kXquartzWindowState\n");
|
||||
RootlessNativeWindowStateChanged(xprGetXWindow(xe[i].u.clientMessage.u.l.longs0),
|
||||
xe[i].u.clientMessage.u.l.longs1);
|
||||
break;
|
||||
|
||||
case kXquartzWindowMoved:
|
||||
DEBUG_LOG("kXquartzWindowMoved\n");
|
||||
RootlessNativeWindowMoved ((WindowPtr)xe[i].u.clientMessage.u.l.longs0);
|
||||
break;
|
||||
|
||||
|
||||
case kXquartzToggleFullscreen:
|
||||
DEBUG_LOG("kXquartzToggleFullscreen\n");
|
||||
#ifdef DARWIN_DDX_MISSING
|
||||
|
@ -304,11 +291,6 @@ void DarwinEventHandler(int screenNum, xEventPtr xe, DeviceIntPtr dev, int neven
|
|||
GiveUp(0);
|
||||
break;
|
||||
|
||||
case kXquartzBringAllToFront:
|
||||
DEBUG_LOG("kXquartzBringAllToFront\n");
|
||||
RootlessOrderAllWindows();
|
||||
break;
|
||||
|
||||
case kXquartzSpaceChanged:
|
||||
DEBUG_LOG("kXquartzSpaceChanged\n");
|
||||
QuartzSpaceChanged(xe[i].u.clientMessage.u.l.longs0);
|
||||
|
@ -329,7 +311,7 @@ Bool DarwinEQInit(DevicePtr pKbd, DevicePtr pPtr) {
|
|||
FatalError("Couldn't allocate event buffer\n");
|
||||
|
||||
if((err = pthread_mutex_init(&mieqEnqueue_mutex, NULL))) {
|
||||
FatalError("Couldn't allocate miEnqueue mutex: %d.\n", err);
|
||||
FatalError("Couldn't allocate mieqEnqueue mutex: %d.\n", err);
|
||||
}
|
||||
|
||||
mieqInit();
|
||||
|
@ -346,9 +328,9 @@ Bool DarwinEQInit(DevicePtr pKbd, DevicePtr pPtr) {
|
|||
mieqSetHandler(kXquartzControllerNotify, DarwinEventHandler);
|
||||
mieqSetHandler(kXquartzPasteboardNotify, DarwinEventHandler);
|
||||
mieqSetHandler(kXquartzDisplayChanged, QuartzDisplayChangedHandler);
|
||||
mieqSetHandler(kXquartzWindowState, DarwinEventHandler);
|
||||
mieqSetHandler(kXquartzWindowMoved, DarwinEventHandler);
|
||||
|
||||
QuartzModeEQInit();
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
|
|
@ -41,7 +41,4 @@ void DarwinSendScrollEvents(float count_x, float count_y, int pointer_x, int poi
|
|||
float pressure, float tilt_x, float tilt_y);
|
||||
void DarwinUpdateModKeys(int flags);
|
||||
|
||||
void DarwinEventHandler(int screenNum, xEventPtr xe, DeviceIntPtr dev,
|
||||
int nevents);
|
||||
|
||||
#endif /* _DARWIN_EVENTS_H */
|
||||
|
|
|
@ -11,6 +11,7 @@ Xquartz_SOURCES = \
|
|||
dri.c \
|
||||
xprAppleWM.c \
|
||||
xprCursor.c \
|
||||
xprEvent.c \
|
||||
xprFrame.c \
|
||||
xprScreen.c \
|
||||
x-hash.c \
|
||||
|
@ -71,4 +72,5 @@ EXTRA_DIST = \
|
|||
x-hash.h \
|
||||
x-hook.h \
|
||||
x-list.h \
|
||||
xpr.h
|
||||
xpr.h \
|
||||
xprEvent.h
|
||||
|
|
|
@ -30,6 +30,7 @@
|
|||
#define XPR_H
|
||||
|
||||
#include "screenint.h"
|
||||
#include <Xplugin.h>
|
||||
|
||||
Bool QuartzModeBundleInit(void);
|
||||
|
||||
|
@ -37,6 +38,7 @@ void AppleDRIExtensionInit(void);
|
|||
void xprAppleWMInit(void);
|
||||
Bool xprInit(ScreenPtr pScreen);
|
||||
Bool xprIsX11Window(void *nsWindow, int windowNumber);
|
||||
WindowPtr xprGetXWindow(xp_window_id wid);
|
||||
|
||||
void xprHideWindows(Bool hide);
|
||||
|
||||
|
|
|
@ -35,6 +35,7 @@
|
|||
#include "inputstr.h"
|
||||
#include "quartz.h"
|
||||
#include "xpr.h"
|
||||
#include "xprEvent.h"
|
||||
#include "pseudoramiX.h"
|
||||
#include "darwin.h"
|
||||
#include "rootless.h"
|
||||
|
@ -44,9 +45,6 @@
|
|||
#include "applewmExt.h"
|
||||
#include "micmap.h"
|
||||
|
||||
// From xprFrame.c
|
||||
WindowPtr xprGetXWindow(xp_window_id wid);
|
||||
|
||||
#ifdef DAMAGE
|
||||
# include "damage.h"
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue
Block a user