Cleanup: remove unused window states, add doc-strings
Note that the GHOST_TWindowState is stored in DNA & that values shouldn't be changed.
This commit is contained in:
parent
3ca1e828e2
commit
989b5de8e9
|
@ -170,14 +170,15 @@ typedef enum {
|
|||
GHOST_kModifierKeyNum
|
||||
} GHOST_TModifierKey;
|
||||
|
||||
/**
|
||||
* \note these values are stored in #wmWindow::windowstate,
|
||||
* don't change, only add new values.
|
||||
*/
|
||||
typedef enum {
|
||||
GHOST_kWindowStateNormal = 0,
|
||||
GHOST_kWindowStateMaximized,
|
||||
GHOST_kWindowStateMinimized,
|
||||
GHOST_kWindowStateFullScreen,
|
||||
GHOST_kWindowStateEmbedded,
|
||||
// GHOST_kWindowStateModified,
|
||||
// GHOST_kWindowStateUnModified,
|
||||
GHOST_kWindowStateMaximized = 1,
|
||||
GHOST_kWindowStateMinimized = 2,
|
||||
GHOST_kWindowStateFullScreen = 3,
|
||||
} GHOST_TWindowState;
|
||||
|
||||
typedef enum {
|
||||
|
|
|
@ -332,9 +332,6 @@ static bool gwl_window_state_set_for_libdecor(libdecor_frame *frame,
|
|||
libdecor_frame_set_fullscreen(frame, nullptr);
|
||||
break;
|
||||
}
|
||||
case GHOST_kWindowStateEmbedded: {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
@ -377,9 +374,6 @@ static bool gwl_window_state_set_for_xdg(xdg_toplevel *toplevel,
|
|||
xdg_toplevel_set_fullscreen(toplevel, nullptr);
|
||||
break;
|
||||
}
|
||||
case GHOST_kWindowStateEmbedded: {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -269,7 +269,7 @@ typedef struct wmWindow {
|
|||
int winid;
|
||||
/** Window coords. */
|
||||
short posx, posy, sizex, sizey;
|
||||
/** Borderless, full. */
|
||||
/** Normal, maximized, full-screen, #GHOST_TWindowState. */
|
||||
char windowstate;
|
||||
/** Set to 1 if an active window, for quick rejects. */
|
||||
char active;
|
||||
|
|
|
@ -109,7 +109,7 @@ static struct WMInitStruct {
|
|||
int size_x, size_y;
|
||||
int start_x, start_y;
|
||||
|
||||
int windowstate;
|
||||
GHOST_TWindowState windowstate;
|
||||
eWinOverrideFlag override_flag;
|
||||
|
||||
bool window_focus;
|
||||
|
@ -735,7 +735,6 @@ static void wm_window_ghostwindow_add(wmWindowManager *wm,
|
|||
/* Clear double buffer to avoids flickering of new windows on certain drivers. (See #97600) */
|
||||
GPU_clear_color(0.55f, 0.55f, 0.55f, 1.0f);
|
||||
|
||||
// GHOST_SetWindowState(ghostwin, GHOST_kWindowStateModified);
|
||||
GPU_render_end();
|
||||
}
|
||||
else {
|
||||
|
|
Loading…
Reference in New Issue