aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xquartz/darwinEvents.c
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/hw/xquartz/darwinEvents.c')
-rw-r--r--xorg-server/hw/xquartz/darwinEvents.c22
1 files changed, 14 insertions, 8 deletions
diff --git a/xorg-server/hw/xquartz/darwinEvents.c b/xorg-server/hw/xquartz/darwinEvents.c
index 663087d74..a00c89ecd 100644
--- a/xorg-server/hw/xquartz/darwinEvents.c
+++ b/xorg-server/hw/xquartz/darwinEvents.c
@@ -52,6 +52,7 @@ in this Software without prior written authorization from The Open Group.
#include "darwin.h"
#include "quartz.h"
#include "quartzKeyboard.h"
+#include "quartzRandR.h"
#include "darwinEvents.h"
#include <sys/types.h>
@@ -238,19 +239,19 @@ static void DarwinEventHandler(int screenNum, InternalEvent *ie, DeviceIntPtr de
case kXquartzToggleFullscreen:
DEBUG_LOG("kXquartzToggleFullscreen\n");
- if(quartzEnableRootless)
+ if(XQuartzIsRootless)
ErrorF("Ignoring kXquartzToggleFullscreen because of rootless mode.");
- else if (quartzHasRoot)
- QuartzHide();
- else
- QuartzShow();
+ else
+ QuartzRandRToggleFullscreen();
break;
case kXquartzSetRootless:
DEBUG_LOG("kXquartzSetRootless\n");
- QuartzSetRootless(e->data[0]);
- if (!quartzEnableRootless && !quartzHasRoot)
- QuartzHide();
+ if(e->data[0]) {
+ QuartzRandRSetFakeRootless();
+ } else {
+ QuartzRandRSetFakeFullscreen(FALSE);
+ }
break;
case kXquartzSetRootClip:
@@ -276,7 +277,12 @@ static void DarwinEventHandler(int screenNum, InternalEvent *ie, DeviceIntPtr de
break;
case kXquartzDisplayChanged:
+ DEBUG_LOG("kXquartzDisplayChanged\n");
QuartzUpdateScreens();
+#ifdef RANDR
+ /* Update our RandR info */
+ QuartzRandRUpdateFakeModes(TRUE);
+#endif
break;
default: