6882909: Resetting a full-screen window to normal rotates screen to normal orientation
Retain rotation upon change to full screen mode Reviewed-by: art, anthony
This commit is contained in:
parent
67ffb33afa
commit
58c459c32e
@ -1681,6 +1681,9 @@ typedef Status
|
|||||||
Rotation rotation,
|
Rotation rotation,
|
||||||
short rate,
|
short rate,
|
||||||
Time timestamp);
|
Time timestamp);
|
||||||
|
typedef Rotation
|
||||||
|
(*XRRConfigRotationsType)(XRRScreenConfiguration *config,
|
||||||
|
Rotation *current_rotation);
|
||||||
|
|
||||||
static XRRQueryVersionType awt_XRRQueryVersion;
|
static XRRQueryVersionType awt_XRRQueryVersion;
|
||||||
static XRRGetScreenInfoType awt_XRRGetScreenInfo;
|
static XRRGetScreenInfoType awt_XRRGetScreenInfo;
|
||||||
@ -1690,6 +1693,7 @@ static XRRConfigCurrentRateType awt_XRRConfigCurrentRate;
|
|||||||
static XRRConfigSizesType awt_XRRConfigSizes;
|
static XRRConfigSizesType awt_XRRConfigSizes;
|
||||||
static XRRConfigCurrentConfigurationType awt_XRRConfigCurrentConfiguration;
|
static XRRConfigCurrentConfigurationType awt_XRRConfigCurrentConfiguration;
|
||||||
static XRRSetScreenConfigAndRateType awt_XRRSetScreenConfigAndRate;
|
static XRRSetScreenConfigAndRateType awt_XRRSetScreenConfigAndRate;
|
||||||
|
static XRRConfigRotationsType awt_XRRConfigRotations;
|
||||||
|
|
||||||
#define LOAD_XRANDR_FUNC(f) \
|
#define LOAD_XRANDR_FUNC(f) \
|
||||||
do { \
|
do { \
|
||||||
@ -1756,6 +1760,7 @@ X11GD_InitXrandrFuncs(JNIEnv *env)
|
|||||||
LOAD_XRANDR_FUNC(XRRConfigSizes);
|
LOAD_XRANDR_FUNC(XRRConfigSizes);
|
||||||
LOAD_XRANDR_FUNC(XRRConfigCurrentConfiguration);
|
LOAD_XRANDR_FUNC(XRRConfigCurrentConfiguration);
|
||||||
LOAD_XRANDR_FUNC(XRRSetScreenConfigAndRate);
|
LOAD_XRANDR_FUNC(XRRSetScreenConfigAndRate);
|
||||||
|
LOAD_XRANDR_FUNC(XRRConfigRotations);
|
||||||
|
|
||||||
return JNI_TRUE;
|
return JNI_TRUE;
|
||||||
}
|
}
|
||||||
@ -2010,6 +2015,7 @@ Java_sun_awt_X11GraphicsDevice_configDisplayMode
|
|||||||
jboolean success = JNI_FALSE;
|
jboolean success = JNI_FALSE;
|
||||||
XRRScreenConfiguration *config;
|
XRRScreenConfiguration *config;
|
||||||
Drawable root;
|
Drawable root;
|
||||||
|
Rotation currentRotation = RR_Rotate_0;
|
||||||
|
|
||||||
AWT_LOCK();
|
AWT_LOCK();
|
||||||
|
|
||||||
@ -2021,6 +2027,7 @@ Java_sun_awt_X11GraphicsDevice_configDisplayMode
|
|||||||
short chosenRate = -1;
|
short chosenRate = -1;
|
||||||
int nsizes;
|
int nsizes;
|
||||||
XRRScreenSize *sizes = awt_XRRConfigSizes(config, &nsizes);
|
XRRScreenSize *sizes = awt_XRRConfigSizes(config, &nsizes);
|
||||||
|
awt_XRRConfigRotations(config, ¤tRotation);
|
||||||
|
|
||||||
if (sizes != NULL) {
|
if (sizes != NULL) {
|
||||||
int i, j;
|
int i, j;
|
||||||
@ -2054,7 +2061,7 @@ Java_sun_awt_X11GraphicsDevice_configDisplayMode
|
|||||||
Status status =
|
Status status =
|
||||||
awt_XRRSetScreenConfigAndRate(awt_display, config, root,
|
awt_XRRSetScreenConfigAndRate(awt_display, config, root,
|
||||||
chosenSizeIndex,
|
chosenSizeIndex,
|
||||||
RR_Rotate_0,
|
currentRotation,
|
||||||
chosenRate,
|
chosenRate,
|
||||||
CurrentTime);
|
CurrentTime);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user