mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2025-12-25 06:00:06 +01:00
a first stab at DEBUG_LOG
This commit is contained in:
parent
7696bcddd0
commit
6577916c44
5 changed files with 16 additions and 20 deletions
|
|
@ -54,8 +54,6 @@
|
|||
#include <sys/types.h>
|
||||
#include <sys/wait.h>
|
||||
|
||||
#define TRACE() fprintf (stderr, "%s\n", __FUNCTION__)
|
||||
|
||||
@implementation X11Controller
|
||||
|
||||
- (void) awakeFromNib
|
||||
|
|
|
|||
|
|
@ -667,6 +667,7 @@ void OsVendorInit(void)
|
|||
}
|
||||
#endif
|
||||
}
|
||||
// DEBUG_LOG("Xquartz started at %s\n", ctime(time(NULL)));
|
||||
|
||||
// Find the full path to the keymapping file.
|
||||
if ( darwinKeymapFile ) {
|
||||
|
|
|
|||
|
|
@ -89,6 +89,7 @@ static void DarwinPressModifierMask(
|
|||
{
|
||||
int key = DarwinModifierNXMaskToNXKey(mask);
|
||||
|
||||
DEBUG_LOG("DarwinPressModifierMask(%p, %x, %d)\n", xe, mask, key);
|
||||
if (key != -1) {
|
||||
int keycode = DarwinModifierNXKeyToNXKeycode(key, 0);
|
||||
if (keycode != 0)
|
||||
|
|
@ -128,6 +129,7 @@ static void DarwinUpdateModifiers(
|
|||
int pressed, // KeyPress or KeyRelease
|
||||
int flags ) // modifier flags that have changed
|
||||
{
|
||||
DEBUG_LOG("DarwinUpdateModifiers(%p, %d, %x)\n", xe, pressed, flags);
|
||||
xe->u.u.type = pressed;
|
||||
if (flags & NX_COMMANDMASK) DarwinPressModifierMask(xe, COMMAND_MASK(flags));
|
||||
if (flags & NX_CONTROLMASK) DarwinPressModifierMask(xe, CONTROL_MASK(flags));
|
||||
|
|
@ -155,6 +157,7 @@ static void DarwinReleaseModifiers(void) {
|
|||
xEvent ke;
|
||||
int i = 0, j = 0, nevents = 0;
|
||||
|
||||
DEBUG_LOG("DarwinReleaseModifiers(%p)\n", darwinKeyc);
|
||||
if (!darwinKeyc) return;
|
||||
map = darwinKeyc->curKeySyms.map;
|
||||
|
||||
|
|
@ -171,6 +174,7 @@ static void DarwinReleaseModifiers(void) {
|
|||
case XK_Kana_Lock:
|
||||
break;
|
||||
default:
|
||||
DEBUG_LOG("DarwinReleaseModifiers: releasing key %d\n", i);
|
||||
ke.u.keyButtonPointer.time = GetTimeInMillis();
|
||||
ke.u.keyButtonPointer.rootX = 0;
|
||||
ke.u.keyButtonPointer.rootY = 0;
|
||||
|
|
@ -202,6 +206,7 @@ static void DarwinSimulateMouseClick(
|
|||
int whichButton, // mouse button to be pressed
|
||||
int modifierMask) // modifiers used for the fake click
|
||||
{
|
||||
DEBUG_LOG("DarwinSimulateMouseClick(%p, %d, %x)\n", xe, whichButton, modifierMask);
|
||||
// first fool X into forgetting about the keys
|
||||
// for some reason, it's not enough to tell X we released the Command key --
|
||||
// it has to be the *left* Command key.
|
||||
|
|
|
|||
|
|
@ -249,7 +249,7 @@ static void QuartzUpdateScreens(void)
|
|||
int x, y, width, height, sx, sy;
|
||||
xEvent e;
|
||||
|
||||
TRACE("QuartzUpdateScreens()\n");
|
||||
DEBUG_LOG("QuartzUpdateScreens()\n");
|
||||
if (noPseudoramiXExtension || screenInfo.numScreens != 1)
|
||||
{
|
||||
/* FIXME: if not using Xinerama, we have multiple screens, and
|
||||
|
|
@ -414,7 +414,7 @@ void DarwinModeProcessEvent(
|
|||
{
|
||||
switch (xe->u.u.type) {
|
||||
case kXDarwinControllerNotify:
|
||||
TRACE("kXDarwinControllerNotify\n");
|
||||
DEBUG_LOG("kXDarwinControllerNotify\n");
|
||||
AppleWMSendEvent(AppleWMControllerNotify,
|
||||
AppleWMControllerNotifyMask,
|
||||
xe->u.clientMessage.u.l.longs0,
|
||||
|
|
@ -422,7 +422,7 @@ void DarwinModeProcessEvent(
|
|||
break;
|
||||
|
||||
case kXDarwinPasteboardNotify:
|
||||
TRACE("kXDarwinPasteboardNotify\n");
|
||||
DEBUG_LOG("kXDarwinPasteboardNotify\n");
|
||||
AppleWMSendEvent(AppleWMPasteboardNotify,
|
||||
AppleWMPasteboardNotifyMask,
|
||||
xe->u.clientMessage.u.l.longs0,
|
||||
|
|
@ -430,7 +430,7 @@ void DarwinModeProcessEvent(
|
|||
break;
|
||||
|
||||
case kXDarwinActivate:
|
||||
TRACE("kXDarwinActivate\n");
|
||||
DEBUG_LOG("kXDarwinActivate\n");
|
||||
QuartzShow(xe->u.keyButtonPointer.rootX,
|
||||
xe->u.keyButtonPointer.rootY);
|
||||
AppleWMSendEvent(AppleWMActivationNotify,
|
||||
|
|
@ -439,7 +439,7 @@ void DarwinModeProcessEvent(
|
|||
break;
|
||||
|
||||
case kXDarwinDeactivate:
|
||||
TRACE("kXDarwinDeactivate\n");
|
||||
DEBUG_LOG("kXDarwinDeactivate\n");
|
||||
AppleWMSendEvent(AppleWMActivationNotify,
|
||||
AppleWMActivationNotifyMask,
|
||||
AppleWMIsInactive, 0);
|
||||
|
|
@ -447,23 +447,23 @@ void DarwinModeProcessEvent(
|
|||
break;
|
||||
|
||||
case kXDarwinDisplayChanged:
|
||||
TRACE("kXDarwinDisplayChanged\n");
|
||||
DEBUG_LOG("kXDarwinDisplayChanged\n");
|
||||
QuartzUpdateScreens();
|
||||
break;
|
||||
|
||||
case kXDarwinWindowState:
|
||||
TRACE("kXDarwinWindowState\n");
|
||||
DEBUG_LOG("kXDarwinWindowState\n");
|
||||
RootlessNativeWindowStateChanged(xe->u.clientMessage.u.l.longs0,
|
||||
xe->u.clientMessage.u.l.longs1);
|
||||
break;
|
||||
|
||||
case kXDarwinWindowMoved:
|
||||
TRACE("kXDarwinWindowMoved\n");
|
||||
DEBUG_LOG("kXDarwinWindowMoved\n");
|
||||
RootlessNativeWindowMoved (xe->u.clientMessage.u.l.longs0);
|
||||
break;
|
||||
|
||||
case kXDarwinToggleFullscreen:
|
||||
TRACE("kXDarwinToggleFullscreen\n");
|
||||
DEBUG_LOG("kXDarwinToggleFullscreen\n");
|
||||
#ifdef DARWIN_DDX_MISSING
|
||||
if (quartzEnableRootless) QuartzSetFullscreen(!quartzHasRoot);
|
||||
else if (quartzHasRoot) QuartzHide();
|
||||
|
|
@ -499,7 +499,7 @@ void DarwinModeProcessEvent(
|
|||
break;
|
||||
|
||||
case kXDarwinBringAllToFront:
|
||||
TRACE("kXDarwinBringAllToFront\n");
|
||||
DEBUG_LOG("kXDarwinBringAllToFront\n");
|
||||
RootlessOrderAllWindows();
|
||||
break;
|
||||
|
||||
|
|
|
|||
|
|
@ -38,14 +38,6 @@
|
|||
#include "screenint.h"
|
||||
#include "window.h"
|
||||
|
||||
//#define DEBUG 1
|
||||
|
||||
#ifdef DEBUG
|
||||
#define TRACE(msg, args...) ErrorF("%s:%d: " msg, __FUNCTION__, __LINE__, ##args )
|
||||
#else
|
||||
#define TRACE(msg, args...)
|
||||
#endif
|
||||
|
||||
/*------------------------------------------
|
||||
Quartz display mode function types
|
||||
------------------------------------------*/
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue