@@ -485,8 +485,8 @@ set_properties_now(WindowProperties &properties) {
485
485
486
486
// We're either going into or out of fullscreen, or are in fullscreen and
487
487
// are changing the resolution.
488
- bool is_fullscreen = _properties.has_fullscreen () && _properties.get_fullscreen () ;
489
- bool want_fullscreen = properties.has_fullscreen () ? properties.get_fullscreen () : is_fullscreen;
488
+ bool is_fullscreen = _properties.has_window_mode () && _properties.get_window_mode () == WindowProperties::W_fullscreen ;
489
+ bool want_fullscreen = properties.has_window_mode () ? properties.get_window_mode () == WindowProperties::W_fullscreen : is_fullscreen;
490
490
491
491
if (is_fullscreen != want_fullscreen || (is_fullscreen && properties.has_size ())) {
492
492
if (want_fullscreen) {
@@ -588,10 +588,10 @@ set_properties_now(WindowProperties &properties) {
588
588
properties.clear_title ();
589
589
}
590
590
591
- // Same for fullscreen.
592
- if (properties.has_fullscreen ()) {
593
- _properties.set_fullscreen (properties.get_fullscreen ());
594
- properties.clear_fullscreen ();
591
+ // Assume we've dealt with window_mode in set_wm_properties()
592
+ if (properties.has_window_mode ()) {
593
+ _properties.set_window_mode (properties.get_window_mode ());
594
+ properties.clear_window_mode ();
595
595
}
596
596
597
597
// The size and position of an already-open window are changed via explicit
@@ -601,7 +601,7 @@ set_properties_now(WindowProperties &properties) {
601
601
XWindowChanges changes;
602
602
int value_mask = 0 ;
603
603
604
- if (_properties.get_fullscreen () ) {
604
+ if (_properties.get_window_mode () == WindowProperties::W_fullscreen ) {
605
605
changes.x = 0 ;
606
606
changes.y = 0 ;
607
607
value_mask |= CWX | CWY;
@@ -861,7 +861,7 @@ open_window() {
861
861
_properties.set_size (100 , 100 );
862
862
}
863
863
864
- if (_properties.get_fullscreen () && x11_pipe->_have_xrandr ) {
864
+ if (_properties.get_window_mode () == WindowProperties::W_fullscreen && x11_pipe->_have_xrandr ) {
865
865
XRRScreenConfiguration* conf = _XRRGetScreenInfo (_display, x11_pipe->get_root ());
866
866
if (_orig_size_id == (SizeID) -1 ) {
867
867
_orig_size_id = x11_pipe->_XRRConfigCurrentConfiguration (conf, &_orig_rotation);
@@ -1027,7 +1027,7 @@ set_wm_properties(const WindowProperties &properties, bool already_mapped) {
1027
1027
size_hints_p = XAllocSizeHints ();
1028
1028
if (size_hints_p != (XSizeHints *)NULL ) {
1029
1029
if (properties.has_origin ()) {
1030
- if (_properties.get_fullscreen () ) {
1030
+ if (_properties.get_window_mode () == WindowProperties::W_fullscreen ) {
1031
1031
size_hints_p->x = 0 ;
1032
1032
size_hints_p->y = 0 ;
1033
1033
} else {
@@ -1088,8 +1088,8 @@ set_wm_properties(const WindowProperties &properties, bool already_mapped) {
1088
1088
SetAction set_data[max_set_data];
1089
1089
int next_set_data = 0 ;
1090
1090
1091
- if (properties.has_fullscreen ()) {
1092
- if (properties.get_fullscreen () ) {
1091
+ if (properties.has_window_mode ()) {
1092
+ if (properties.get_window_mode () == WindowProperties::W_fullscreen ) {
1093
1093
// For a "fullscreen" request, we pass this through, hoping the window
1094
1094
// manager will support EWMH.
1095
1095
type_data[next_type_data++] = x11_pipe->_net_wm_window_type_fullscreen ;
@@ -1123,12 +1123,15 @@ set_wm_properties(const WindowProperties &properties, bool already_mapped) {
1123
1123
class_hints_p->res_name = (char *) x_wm_class_name.c_str ();
1124
1124
}
1125
1125
1126
- } else if (properties.get_undecorated () || properties.get_fullscreen ()) {
1126
+ } else if (properties.get_window_mode () == WindowProperties::W_undecorated ||
1127
+ properties.get_window_mode () == WindowProperties::W_fullscreen)
1128
+ {
1127
1129
class_hints_p = XAllocClassHint ();
1128
1130
class_hints_p->res_class = (char *) " Undecorated" ;
1129
1131
}
1130
1132
1131
- if (properties.get_undecorated () && !properties.get_fullscreen ()) {
1133
+ if (properties.get_window_mode () == WindowProperties::W_undecorated)
1134
+ {
1132
1135
type_data[next_type_data++] = x11_pipe->_net_wm_window_type_splash ;
1133
1136
}
1134
1137
@@ -1226,6 +1229,7 @@ set_wm_properties(const WindowProperties &properties, bool already_mapped) {
1226
1229
1227
1230
XSetWMProtocols (_display, _xwindow, protocols,
1228
1231
sizeof (protocols) / sizeof (Atom));
1232
+
1229
1233
}
1230
1234
1231
1235
/* *
0 commit comments