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 "applewmExt.h"
|
||||||
#include <X11/extensions/applewm.h>
|
#include <X11/extensions/applewm.h>
|
||||||
|
|
||||||
/* FIXME: Abstract this away into xpr */
|
/* FIXME: Abstract this better */
|
||||||
#include <Xplugin.h>
|
void QuartzModeEQInit(void);
|
||||||
#include "rootlessWindow.h"
|
|
||||||
WindowPtr xprGetXWindow(xp_window_id wid);
|
|
||||||
|
|
||||||
int input_check_zero, input_check_flag;
|
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
|
be moved into their own individual functions and set as handlers using
|
||||||
mieqSetHandler. */
|
mieqSetHandler. */
|
||||||
|
|
||||||
void DarwinEventHandler(int screenNum, xEventPtr xe, DeviceIntPtr dev, int nevents) {
|
static void DarwinEventHandler(int screenNum, xEventPtr xe, DeviceIntPtr dev, int nevents) {
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
TA_SERVER();
|
TA_SERVER();
|
||||||
|
@ -260,17 +258,6 @@ void DarwinEventHandler(int screenNum, xEventPtr xe, DeviceIntPtr dev, int neven
|
||||||
QuartzHide();
|
QuartzHide();
|
||||||
break;
|
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:
|
case kXquartzToggleFullscreen:
|
||||||
DEBUG_LOG("kXquartzToggleFullscreen\n");
|
DEBUG_LOG("kXquartzToggleFullscreen\n");
|
||||||
#ifdef DARWIN_DDX_MISSING
|
#ifdef DARWIN_DDX_MISSING
|
||||||
|
@ -304,11 +291,6 @@ void DarwinEventHandler(int screenNum, xEventPtr xe, DeviceIntPtr dev, int neven
|
||||||
GiveUp(0);
|
GiveUp(0);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case kXquartzBringAllToFront:
|
|
||||||
DEBUG_LOG("kXquartzBringAllToFront\n");
|
|
||||||
RootlessOrderAllWindows();
|
|
||||||
break;
|
|
||||||
|
|
||||||
case kXquartzSpaceChanged:
|
case kXquartzSpaceChanged:
|
||||||
DEBUG_LOG("kXquartzSpaceChanged\n");
|
DEBUG_LOG("kXquartzSpaceChanged\n");
|
||||||
QuartzSpaceChanged(xe[i].u.clientMessage.u.l.longs0);
|
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");
|
FatalError("Couldn't allocate event buffer\n");
|
||||||
|
|
||||||
if((err = pthread_mutex_init(&mieqEnqueue_mutex, NULL))) {
|
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();
|
mieqInit();
|
||||||
|
@ -346,8 +328,8 @@ Bool DarwinEQInit(DevicePtr pKbd, DevicePtr pPtr) {
|
||||||
mieqSetHandler(kXquartzControllerNotify, DarwinEventHandler);
|
mieqSetHandler(kXquartzControllerNotify, DarwinEventHandler);
|
||||||
mieqSetHandler(kXquartzPasteboardNotify, DarwinEventHandler);
|
mieqSetHandler(kXquartzPasteboardNotify, DarwinEventHandler);
|
||||||
mieqSetHandler(kXquartzDisplayChanged, QuartzDisplayChangedHandler);
|
mieqSetHandler(kXquartzDisplayChanged, QuartzDisplayChangedHandler);
|
||||||
mieqSetHandler(kXquartzWindowState, DarwinEventHandler);
|
|
||||||
mieqSetHandler(kXquartzWindowMoved, DarwinEventHandler);
|
QuartzModeEQInit();
|
||||||
|
|
||||||
return TRUE;
|
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);
|
float pressure, float tilt_x, float tilt_y);
|
||||||
void DarwinUpdateModKeys(int flags);
|
void DarwinUpdateModKeys(int flags);
|
||||||
|
|
||||||
void DarwinEventHandler(int screenNum, xEventPtr xe, DeviceIntPtr dev,
|
|
||||||
int nevents);
|
|
||||||
|
|
||||||
#endif /* _DARWIN_EVENTS_H */
|
#endif /* _DARWIN_EVENTS_H */
|
||||||
|
|
|
@ -11,6 +11,7 @@ Xquartz_SOURCES = \
|
||||||
dri.c \
|
dri.c \
|
||||||
xprAppleWM.c \
|
xprAppleWM.c \
|
||||||
xprCursor.c \
|
xprCursor.c \
|
||||||
|
xprEvent.c \
|
||||||
xprFrame.c \
|
xprFrame.c \
|
||||||
xprScreen.c \
|
xprScreen.c \
|
||||||
x-hash.c \
|
x-hash.c \
|
||||||
|
@ -71,4 +72,5 @@ EXTRA_DIST = \
|
||||||
x-hash.h \
|
x-hash.h \
|
||||||
x-hook.h \
|
x-hook.h \
|
||||||
x-list.h \
|
x-list.h \
|
||||||
xpr.h
|
xpr.h \
|
||||||
|
xprEvent.h
|
||||||
|
|
|
@ -30,6 +30,7 @@
|
||||||
#define XPR_H
|
#define XPR_H
|
||||||
|
|
||||||
#include "screenint.h"
|
#include "screenint.h"
|
||||||
|
#include <Xplugin.h>
|
||||||
|
|
||||||
Bool QuartzModeBundleInit(void);
|
Bool QuartzModeBundleInit(void);
|
||||||
|
|
||||||
|
@ -37,6 +38,7 @@ void AppleDRIExtensionInit(void);
|
||||||
void xprAppleWMInit(void);
|
void xprAppleWMInit(void);
|
||||||
Bool xprInit(ScreenPtr pScreen);
|
Bool xprInit(ScreenPtr pScreen);
|
||||||
Bool xprIsX11Window(void *nsWindow, int windowNumber);
|
Bool xprIsX11Window(void *nsWindow, int windowNumber);
|
||||||
|
WindowPtr xprGetXWindow(xp_window_id wid);
|
||||||
|
|
||||||
void xprHideWindows(Bool hide);
|
void xprHideWindows(Bool hide);
|
||||||
|
|
||||||
|
|
|
@ -35,6 +35,7 @@
|
||||||
#include "inputstr.h"
|
#include "inputstr.h"
|
||||||
#include "quartz.h"
|
#include "quartz.h"
|
||||||
#include "xpr.h"
|
#include "xpr.h"
|
||||||
|
#include "xprEvent.h"
|
||||||
#include "pseudoramiX.h"
|
#include "pseudoramiX.h"
|
||||||
#include "darwin.h"
|
#include "darwin.h"
|
||||||
#include "rootless.h"
|
#include "rootless.h"
|
||||||
|
@ -44,9 +45,6 @@
|
||||||
#include "applewmExt.h"
|
#include "applewmExt.h"
|
||||||
#include "micmap.h"
|
#include "micmap.h"
|
||||||
|
|
||||||
// From xprFrame.c
|
|
||||||
WindowPtr xprGetXWindow(xp_window_id wid);
|
|
||||||
|
|
||||||
#ifdef DAMAGE
|
#ifdef DAMAGE
|
||||||
# include "damage.h"
|
# include "damage.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue
Block a user