Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'intern/ghost/intern')
-rw-r--r--intern/ghost/intern/GHOST_Buttons.h5
-rw-r--r--intern/ghost/intern/GHOST_CallbackEventConsumer.h5
-rw-r--r--intern/ghost/intern/GHOST_Context.h5
-rw-r--r--intern/ghost/intern/GHOST_ContextCGL.h5
-rw-r--r--intern/ghost/intern/GHOST_ContextD3D.h5
-rw-r--r--intern/ghost/intern/GHOST_ContextEGL.cpp2
-rw-r--r--intern/ghost/intern/GHOST_ContextEGL.h5
-rw-r--r--intern/ghost/intern/GHOST_ContextGLX.h5
-rw-r--r--intern/ghost/intern/GHOST_ContextNone.h5
-rw-r--r--intern/ghost/intern/GHOST_ContextSDL.h5
-rw-r--r--intern/ghost/intern/GHOST_ContextWGL.h5
-rw-r--r--intern/ghost/intern/GHOST_Debug.h5
-rw-r--r--intern/ghost/intern/GHOST_DisplayManager.h5
-rw-r--r--intern/ghost/intern/GHOST_DisplayManagerCocoa.h5
-rw-r--r--intern/ghost/intern/GHOST_DisplayManagerNULL.h5
-rw-r--r--intern/ghost/intern/GHOST_DisplayManagerSDL.h5
-rw-r--r--intern/ghost/intern/GHOST_DisplayManagerWin32.h5
-rw-r--r--intern/ghost/intern/GHOST_DisplayManagerX11.h5
-rw-r--r--intern/ghost/intern/GHOST_DropTargetWin32.h5
-rw-r--r--intern/ghost/intern/GHOST_DropTargetX11.h5
-rw-r--r--intern/ghost/intern/GHOST_Event.h5
-rw-r--r--intern/ghost/intern/GHOST_EventButton.h5
-rw-r--r--intern/ghost/intern/GHOST_EventCursor.h5
-rw-r--r--intern/ghost/intern/GHOST_EventDragnDrop.h5
-rw-r--r--intern/ghost/intern/GHOST_EventKey.h5
-rw-r--r--intern/ghost/intern/GHOST_EventManager.h5
-rw-r--r--intern/ghost/intern/GHOST_EventNDOF.h5
-rw-r--r--intern/ghost/intern/GHOST_EventPrinter.h5
-rw-r--r--intern/ghost/intern/GHOST_EventString.h5
-rw-r--r--intern/ghost/intern/GHOST_EventTrackpad.h5
-rw-r--r--intern/ghost/intern/GHOST_EventWheel.h5
-rw-r--r--intern/ghost/intern/GHOST_IXrGraphicsBinding.h5
-rw-r--r--intern/ghost/intern/GHOST_IconX11.h5
-rw-r--r--intern/ghost/intern/GHOST_ImeWin32.h4
-rw-r--r--intern/ghost/intern/GHOST_ModifierKeys.h5
-rw-r--r--intern/ghost/intern/GHOST_NDOFManager.h5
-rw-r--r--intern/ghost/intern/GHOST_NDOFManagerCocoa.h5
-rw-r--r--intern/ghost/intern/GHOST_NDOFManagerUnix.h5
-rw-r--r--intern/ghost/intern/GHOST_NDOFManagerWin32.h5
-rw-r--r--intern/ghost/intern/GHOST_System.h5
-rw-r--r--intern/ghost/intern/GHOST_SystemCocoa.h5
-rw-r--r--intern/ghost/intern/GHOST_SystemNULL.h5
-rw-r--r--intern/ghost/intern/GHOST_SystemPaths.h5
-rw-r--r--intern/ghost/intern/GHOST_SystemPathsCocoa.h5
-rw-r--r--intern/ghost/intern/GHOST_SystemPathsUnix.h5
-rw-r--r--intern/ghost/intern/GHOST_SystemPathsWin32.h5
-rw-r--r--intern/ghost/intern/GHOST_SystemSDL.h5
-rw-r--r--intern/ghost/intern/GHOST_SystemWayland.h5
-rw-r--r--intern/ghost/intern/GHOST_SystemWin32.cpp6
-rw-r--r--intern/ghost/intern/GHOST_SystemWin32.h4
-rw-r--r--intern/ghost/intern/GHOST_SystemX11.cpp33
-rw-r--r--intern/ghost/intern/GHOST_SystemX11.h5
-rw-r--r--intern/ghost/intern/GHOST_TaskbarWin32.h5
-rw-r--r--intern/ghost/intern/GHOST_TaskbarX11.h5
-rw-r--r--intern/ghost/intern/GHOST_TimerManager.h5
-rw-r--r--intern/ghost/intern/GHOST_TimerTask.h5
-rw-r--r--intern/ghost/intern/GHOST_Window.h9
-rw-r--r--intern/ghost/intern/GHOST_WindowCocoa.h5
-rw-r--r--intern/ghost/intern/GHOST_WindowManager.h5
-rw-r--r--intern/ghost/intern/GHOST_WindowNULL.h5
-rw-r--r--intern/ghost/intern/GHOST_WindowSDL.h5
-rw-r--r--intern/ghost/intern/GHOST_WindowWayland.cpp21
-rw-r--r--intern/ghost/intern/GHOST_WindowWayland.h9
-rw-r--r--intern/ghost/intern/GHOST_WindowWin32.h5
-rw-r--r--intern/ghost/intern/GHOST_WindowX11.h5
-rw-r--r--intern/ghost/intern/GHOST_XrContext.h5
-rw-r--r--intern/ghost/intern/GHOST_XrException.h5
-rw-r--r--intern/ghost/intern/GHOST_XrSession.h5
-rw-r--r--intern/ghost/intern/GHOST_XrSwapchain.h5
-rw-r--r--intern/ghost/intern/GHOST_Xr_intern.h5
-rw-r--r--intern/ghost/intern/GHOST_Xr_openxr_includes.h5
71 files changed, 116 insertions, 287 deletions
diff --git a/intern/ghost/intern/GHOST_Buttons.h b/intern/ghost/intern/GHOST_Buttons.h
index 0b824739950..e28fae8870c 100644
--- a/intern/ghost/intern/GHOST_Buttons.h
+++ b/intern/ghost/intern/GHOST_Buttons.h
@@ -22,8 +22,7 @@
* Declaration of GHOST_Buttons struct.
*/
-#ifndef __GHOST_BUTTONS_H__
-#define __GHOST_BUTTONS_H__
+#pragma once
#include "GHOST_Types.h"
@@ -62,5 +61,3 @@ struct GHOST_Buttons {
GHOST_TUns8 m_ButtonMiddle : 1;
GHOST_TUns8 m_ButtonRight : 1;
};
-
-#endif // __GHOST_BUTTONS_H__
diff --git a/intern/ghost/intern/GHOST_CallbackEventConsumer.h b/intern/ghost/intern/GHOST_CallbackEventConsumer.h
index 9c3fc642209..a1664e77717 100644
--- a/intern/ghost/intern/GHOST_CallbackEventConsumer.h
+++ b/intern/ghost/intern/GHOST_CallbackEventConsumer.h
@@ -22,8 +22,7 @@
* Declaration of GHOST_CallbackEventConsumer class.
*/
-#ifndef __GHOST_CALLBACKEVENTCONSUMER_H__
-#define __GHOST_CALLBACKEVENTCONSUMER_H__
+#pragma once
#include "GHOST_C-api.h"
#include "GHOST_IEventConsumer.h"
@@ -66,5 +65,3 @@ class GHOST_CallbackEventConsumer : public GHOST_IEventConsumer {
MEM_CXX_CLASS_ALLOC_FUNCS("GHOST:GHOST_CallbackEventConsumer")
#endif
};
-
-#endif // __GHOST_CALLBACKEVENTCONSUMER_H__
diff --git a/intern/ghost/intern/GHOST_Context.h b/intern/ghost/intern/GHOST_Context.h
index 411a7de5c79..33eeacbb203 100644
--- a/intern/ghost/intern/GHOST_Context.h
+++ b/intern/ghost/intern/GHOST_Context.h
@@ -22,8 +22,7 @@
* Declaration of GHOST_Context class.
*/
-#ifndef __GHOST_CONTEXT_H__
-#define __GHOST_CONTEXT_H__
+#pragma once
#include "GHOST_IContext.h"
#include "GHOST_Types.h"
@@ -160,5 +159,3 @@ bool win32_silent_chk(bool result);
# define WIN32_CHK_SILENT(x, silent) ((silent) ? win32_silent_chk(x) : WIN32_CHK(x))
#endif /* _WIN32 */
-
-#endif // __GHOST_CONTEXT_H__
diff --git a/intern/ghost/intern/GHOST_ContextCGL.h b/intern/ghost/intern/GHOST_ContextCGL.h
index 37c1ac34299..7b1e186dede 100644
--- a/intern/ghost/intern/GHOST_ContextCGL.h
+++ b/intern/ghost/intern/GHOST_ContextCGL.h
@@ -21,8 +21,7 @@
* \ingroup GHOST
*/
-#ifndef __GHOST_CONTEXTCGL_H__
-#define __GHOST_CONTEXTCGL_H__
+#pragma once
#include "GHOST_Context.h"
@@ -137,5 +136,3 @@ class GHOST_ContextCGL : public GHOST_Context {
void metalUpdateFramebuffer();
void metalSwapBuffers();
};
-
-#endif // __GHOST_CONTEXTCGL_H__
diff --git a/intern/ghost/intern/GHOST_ContextD3D.h b/intern/ghost/intern/GHOST_ContextD3D.h
index c482992a6e2..e85516838fc 100644
--- a/intern/ghost/intern/GHOST_ContextD3D.h
+++ b/intern/ghost/intern/GHOST_ContextD3D.h
@@ -18,8 +18,7 @@
* \ingroup GHOST
*/
-#ifndef __GHOST_CONTEXTD3D_H__
-#define __GHOST_CONTEXTD3D_H__
+#pragma once
#ifndef WIN32
# error WIN32 only!
@@ -132,5 +131,3 @@ class GHOST_ContextD3D : public GHOST_Context {
ID3D11Device *m_device;
ID3D11DeviceContext *m_device_ctx;
};
-
-#endif /* __GHOST_CONTEXTD3D_H__ */
diff --git a/intern/ghost/intern/GHOST_ContextEGL.cpp b/intern/ghost/intern/GHOST_ContextEGL.cpp
index 02daad2111a..bac7057d953 100644
--- a/intern/ghost/intern/GHOST_ContextEGL.cpp
+++ b/intern/ghost/intern/GHOST_ContextEGL.cpp
@@ -118,7 +118,7 @@ static const char *get_egl_error_message_string(EGLint error)
case EGL_CONTEXT_LOST:
return (
"A power management event has occurred. "
- "The application must destroy all contexts and reinitialise OpenGL ES state "
+ "The application must destroy all contexts and reinitialize OpenGL ES state "
"and objects to continue rendering.");
default:
diff --git a/intern/ghost/intern/GHOST_ContextEGL.h b/intern/ghost/intern/GHOST_ContextEGL.h
index da5ca7ef93f..e5dae0d22a8 100644
--- a/intern/ghost/intern/GHOST_ContextEGL.h
+++ b/intern/ghost/intern/GHOST_ContextEGL.h
@@ -21,8 +21,7 @@
* \ingroup GHOST
*/
-#ifndef __GHOST_CONTEXTEGL_H__
-#define __GHOST_CONTEXTEGL_H__
+#pragma once
#include "GHOST_Context.h"
@@ -137,5 +136,3 @@ class GHOST_ContextEGL : public GHOST_Context {
static HMODULE s_d3dcompiler;
#endif
};
-
-#endif // __GHOST_CONTEXTEGL_H__
diff --git a/intern/ghost/intern/GHOST_ContextGLX.h b/intern/ghost/intern/GHOST_ContextGLX.h
index 07d2601cd17..e5654b1aed7 100644
--- a/intern/ghost/intern/GHOST_ContextGLX.h
+++ b/intern/ghost/intern/GHOST_ContextGLX.h
@@ -21,8 +21,7 @@
* \ingroup GHOST
*/
-#ifndef __GHOST_CONTEXTGLX_H__
-#define __GHOST_CONTEXTGLX_H__
+#pragma once
#include "GHOST_Context.h"
@@ -128,5 +127,3 @@ class GHOST_ContextGLX : public GHOST_Context {
/* used to get GLX info */
int GHOST_X11_GL_GetAttributes(
int *attribs, int attribs_max, bool is_stereo_visual, bool need_alpha, bool for_fb_config);
-
-#endif // __GHOST_CONTEXTGLX_H__
diff --git a/intern/ghost/intern/GHOST_ContextNone.h b/intern/ghost/intern/GHOST_ContextNone.h
index 2a3c08701b4..b1ac349e4a7 100644
--- a/intern/ghost/intern/GHOST_ContextNone.h
+++ b/intern/ghost/intern/GHOST_ContextNone.h
@@ -23,8 +23,7 @@
* Declaration of GHOST_Context class.
*/
-#ifndef __GHOST_CONTEXTNONE_H__
-#define __GHOST_CONTEXTNONE_H__
+#pragma once
#include "GHOST_Context.h"
@@ -86,5 +85,3 @@ class GHOST_ContextNone : public GHOST_Context {
private:
int m_swapInterval;
};
-
-#endif // __GHOST_CONTEXTNONE_H__
diff --git a/intern/ghost/intern/GHOST_ContextSDL.h b/intern/ghost/intern/GHOST_ContextSDL.h
index 670d930e1e7..ead2e91181c 100644
--- a/intern/ghost/intern/GHOST_ContextSDL.h
+++ b/intern/ghost/intern/GHOST_ContextSDL.h
@@ -21,8 +21,7 @@
* \ingroup GHOST
*/
-#ifndef __GHOST_CONTEXTSDL_H__
-#define __GHOST_CONTEXTSDL_H__
+#pragma once
#include "GHOST_Context.h"
@@ -121,5 +120,3 @@ class GHOST_ContextSDL : public GHOST_Context {
static SDL_GLContext s_sharedContext;
static int s_sharedCount;
};
-
-#endif // __GHOST_CONTEXTSDL_H__
diff --git a/intern/ghost/intern/GHOST_ContextWGL.h b/intern/ghost/intern/GHOST_ContextWGL.h
index a8d2c18b463..087fca100e4 100644
--- a/intern/ghost/intern/GHOST_ContextWGL.h
+++ b/intern/ghost/intern/GHOST_ContextWGL.h
@@ -21,8 +21,7 @@
* \ingroup GHOST
*/
-#ifndef __GHOST_CONTEXTWGL_H__
-#define __GHOST_CONTEXTWGL_H__
+#pragma once
//#define WIN32_COMPOSITING
@@ -130,5 +129,3 @@ class GHOST_ContextWGL : public GHOST_Context {
static HGLRC s_sharedHGLRC;
static int s_sharedCount;
};
-
-#endif // __GHOST_CONTEXTWGL_H__
diff --git a/intern/ghost/intern/GHOST_Debug.h b/intern/ghost/intern/GHOST_Debug.h
index 5b5c2688297..424f95aa573 100644
--- a/intern/ghost/intern/GHOST_Debug.h
+++ b/intern/ghost/intern/GHOST_Debug.h
@@ -22,8 +22,7 @@
* Macro's used in GHOST debug target.
*/
-#ifndef __GHOST_DEBUG_H__
-#define __GHOST_DEBUG_H__
+#pragma once
#ifdef _MSC_VER
# ifdef DEBUG
@@ -79,5 +78,3 @@
#else // WITH_GHOST_DEBUG
# define GHOST_ASSERT(x, info) ((void)0)
#endif // WITH_GHOST_DEBUG
-
-#endif // __GHOST_DEBUG_H__
diff --git a/intern/ghost/intern/GHOST_DisplayManager.h b/intern/ghost/intern/GHOST_DisplayManager.h
index 58b36c0035b..67b9aada55f 100644
--- a/intern/ghost/intern/GHOST_DisplayManager.h
+++ b/intern/ghost/intern/GHOST_DisplayManager.h
@@ -22,8 +22,7 @@
* Declaration of GHOST_DisplayManager class.
*/
-#ifndef __GHOST_DISPLAYMANAGER_H__
-#define __GHOST_DISPLAYMANAGER_H__
+#pragma once
#include "GHOST_Types.h"
@@ -127,5 +126,3 @@ class GHOST_DisplayManager {
MEM_CXX_CLASS_ALLOC_FUNCS("GHOST:GHOST_DisplayManager")
#endif
};
-
-#endif // __GHOST_DISPLAYMANAGER_H__
diff --git a/intern/ghost/intern/GHOST_DisplayManagerCocoa.h b/intern/ghost/intern/GHOST_DisplayManagerCocoa.h
index c99e93279f7..5edd555a78b 100644
--- a/intern/ghost/intern/GHOST_DisplayManagerCocoa.h
+++ b/intern/ghost/intern/GHOST_DisplayManagerCocoa.h
@@ -22,8 +22,7 @@
* Declaration of GHOST_DisplayManagerCocoa class.
*/
-#ifndef __GHOST_DISPLAYMANAGERCOCOA_H__
-#define __GHOST_DISPLAYMANAGERCOCOA_H__
+#pragma once
#ifndef __APPLE__
# error Apple only!
@@ -93,5 +92,3 @@ class GHOST_DisplayManagerCocoa : public GHOST_DisplayManager {
/** Cached display id's for each display. */
// CGDirectDisplayID* m_displayIDs;
};
-
-#endif // __GHOST_DISPLAYMANAGERCOCOA_H__
diff --git a/intern/ghost/intern/GHOST_DisplayManagerNULL.h b/intern/ghost/intern/GHOST_DisplayManagerNULL.h
index 266a3e9a699..4ca06faec12 100644
--- a/intern/ghost/intern/GHOST_DisplayManagerNULL.h
+++ b/intern/ghost/intern/GHOST_DisplayManagerNULL.h
@@ -19,8 +19,7 @@
* Declaration of GHOST_DisplayManagerNULL class.
*/
-#ifndef __GHOST_DISPLAYMANAGERNULL_H__
-#define __GHOST_DISPLAYMANAGERNULL_H__
+#pragma once
#include "GHOST_DisplayManager.h"
#include "GHOST_SystemNULL.h"
@@ -58,5 +57,3 @@ class GHOST_DisplayManagerNULL : public GHOST_DisplayManager {
private:
GHOST_SystemNULL *m_system;
};
-
-#endif /* __GHOST_DISPLAYMANAGERNULL_H__ */
diff --git a/intern/ghost/intern/GHOST_DisplayManagerSDL.h b/intern/ghost/intern/GHOST_DisplayManagerSDL.h
index f7704d57ab0..9a79a842057 100644
--- a/intern/ghost/intern/GHOST_DisplayManagerSDL.h
+++ b/intern/ghost/intern/GHOST_DisplayManagerSDL.h
@@ -19,8 +19,7 @@
* Declaration of GHOST_DisplayManagerSDL class.
*/
-#ifndef __GHOST_DISPLAYMANAGERSDL_H__
-#define __GHOST_DISPLAYMANAGERSDL_H__
+#pragma once
#include "GHOST_DisplayManager.h"
@@ -58,5 +57,3 @@ class GHOST_DisplayManagerSDL : public GHOST_DisplayManager {
GHOST_SystemSDL *m_system;
SDL_DisplayMode m_mode;
};
-
-#endif /* __GHOST_DISPLAYMANAGERSDL_H__ */
diff --git a/intern/ghost/intern/GHOST_DisplayManagerWin32.h b/intern/ghost/intern/GHOST_DisplayManagerWin32.h
index c4ad90b1de7..3392d515c16 100644
--- a/intern/ghost/intern/GHOST_DisplayManagerWin32.h
+++ b/intern/ghost/intern/GHOST_DisplayManagerWin32.h
@@ -22,8 +22,7 @@
* Declaration of GHOST_DisplayManagerWin32 class.
*/
-#ifndef __GHOST_DISPLAYMANAGERWIN32_H__
-#define __GHOST_DISPLAYMANAGERWIN32_H__
+#pragma once
#ifndef WIN32
# error WIN32 only!
@@ -87,5 +86,3 @@ class GHOST_DisplayManagerWin32 : public GHOST_DisplayManager {
protected:
};
-
-#endif // __GHOST_DISPLAYMANAGERWIN32_H__
diff --git a/intern/ghost/intern/GHOST_DisplayManagerX11.h b/intern/ghost/intern/GHOST_DisplayManagerX11.h
index 941152aa034..a36ff8d49f1 100644
--- a/intern/ghost/intern/GHOST_DisplayManagerX11.h
+++ b/intern/ghost/intern/GHOST_DisplayManagerX11.h
@@ -22,8 +22,7 @@
* Declaration of GHOST_DisplayManagerX11 class.
*/
-#ifndef __GHOST_DISPLAYMANAGERX11_H__
-#define __GHOST_DISPLAYMANAGERX11_H__
+#pragma once
#include "GHOST_DisplayManager.h"
@@ -86,5 +85,3 @@ class GHOST_DisplayManagerX11 : public GHOST_DisplayManager {
private:
GHOST_SystemX11 *m_system;
};
-
-#endif //
diff --git a/intern/ghost/intern/GHOST_DropTargetWin32.h b/intern/ghost/intern/GHOST_DropTargetWin32.h
index ee75c017981..ecce3a68835 100644
--- a/intern/ghost/intern/GHOST_DropTargetWin32.h
+++ b/intern/ghost/intern/GHOST_DropTargetWin32.h
@@ -21,8 +21,7 @@
* \ingroup GHOST
*/
-#ifndef __GHOST_DROPTARGETWIN32_H__
-#define __GHOST_DROPTARGETWIN32_H__
+#pragma once
#include "GHOST_SystemWin32.h"
#include "GHOST_WindowWin32.h"
@@ -150,5 +149,3 @@ class GHOST_DropTargetWin32 : public IDropTarget {
MEM_CXX_CLASS_ALLOC_FUNCS("GHOST:GHOST_DropTargetWin32")
#endif
};
-
-#endif // __GHOST_DROPTARGETWIN32_H__
diff --git a/intern/ghost/intern/GHOST_DropTargetX11.h b/intern/ghost/intern/GHOST_DropTargetX11.h
index 9ca12442085..066f2f6bba2 100644
--- a/intern/ghost/intern/GHOST_DropTargetX11.h
+++ b/intern/ghost/intern/GHOST_DropTargetX11.h
@@ -21,8 +21,7 @@
* \ingroup GHOST
*/
-#ifndef __GHOST_DROPTARGETX11_H__
-#define __GHOST_DROPTARGETX11_H__
+#pragma once
#include "GHOST_SystemX11.h"
#include "GHOST_WindowX11.h"
@@ -126,5 +125,3 @@ class GHOST_DropTargetX11 {
MEM_CXX_CLASS_ALLOC_FUNCS("GHOST:GHOST_DropTargetX11")
#endif
};
-
-#endif // __GHOST_DROPTARGETX11_H__
diff --git a/intern/ghost/intern/GHOST_Event.h b/intern/ghost/intern/GHOST_Event.h
index 2c14df7f243..845d62fa810 100644
--- a/intern/ghost/intern/GHOST_Event.h
+++ b/intern/ghost/intern/GHOST_Event.h
@@ -22,8 +22,7 @@
* Declaration of GHOST_Event class.
*/
-#ifndef __GHOST_EVENT_H__
-#define __GHOST_EVENT_H__
+#pragma once
#include "GHOST_IEvent.h"
@@ -90,5 +89,3 @@ class GHOST_Event : public GHOST_IEvent {
/** Pointer to the event data. */
GHOST_TEventDataPtr m_data;
};
-
-#endif // __GHOST_EVENT_H__
diff --git a/intern/ghost/intern/GHOST_EventButton.h b/intern/ghost/intern/GHOST_EventButton.h
index 4247ae150a4..7072e0c5409 100644
--- a/intern/ghost/intern/GHOST_EventButton.h
+++ b/intern/ghost/intern/GHOST_EventButton.h
@@ -22,8 +22,7 @@
* Declaration of GHOST_EventButton class.
*/
-#ifndef __GHOST_EVENTBUTTON_H__
-#define __GHOST_EVENTBUTTON_H__
+#pragma once
#include "GHOST_Event.h"
#include "GHOST_Window.h"
@@ -57,5 +56,3 @@ class GHOST_EventButton : public GHOST_Event {
/** The button event data. */
GHOST_TEventButtonData m_buttonEventData;
};
-
-#endif // __GHOST_EVENTBUTTON_H__
diff --git a/intern/ghost/intern/GHOST_EventCursor.h b/intern/ghost/intern/GHOST_EventCursor.h
index 8ba657fd9fa..ba85cd74723 100644
--- a/intern/ghost/intern/GHOST_EventCursor.h
+++ b/intern/ghost/intern/GHOST_EventCursor.h
@@ -22,8 +22,7 @@
* Declaration of GHOST_EventCursor class.
*/
-#ifndef __GHOST_EVENTCURSOR_H__
-#define __GHOST_EVENTCURSOR_H__
+#pragma once
#include "GHOST_Event.h"
@@ -58,5 +57,3 @@ class GHOST_EventCursor : public GHOST_Event {
/** The x,y-coordinates of the cursor position. */
GHOST_TEventCursorData m_cursorEventData;
};
-
-#endif // __GHOST_EVENTCURSOR_H__
diff --git a/intern/ghost/intern/GHOST_EventDragnDrop.h b/intern/ghost/intern/GHOST_EventDragnDrop.h
index 36291e8a254..10975792993 100644
--- a/intern/ghost/intern/GHOST_EventDragnDrop.h
+++ b/intern/ghost/intern/GHOST_EventDragnDrop.h
@@ -21,8 +21,7 @@
* \ingroup GHOST
*/
-#ifndef __GHOST_EVENTDRAGNDROP_H__
-#define __GHOST_EVENTDRAGNDROP_H__
+#pragma once
#include "GHOST_Event.h"
extern "C" {
@@ -122,5 +121,3 @@ class GHOST_EventDragnDrop : public GHOST_Event {
/** The x,y-coordinates of the cursor position. */
GHOST_TEventDragnDropData m_dragnDropEventData;
};
-
-#endif // __GHOST_EVENTDRAGNDROP_H__
diff --git a/intern/ghost/intern/GHOST_EventKey.h b/intern/ghost/intern/GHOST_EventKey.h
index 8f59c555914..cb71b452d80 100644
--- a/intern/ghost/intern/GHOST_EventKey.h
+++ b/intern/ghost/intern/GHOST_EventKey.h
@@ -22,8 +22,7 @@
* Declaration of GHOST_EventKey class.
*/
-#ifndef __GHOST_EVENTKEY_H__
-#define __GHOST_EVENTKEY_H__
+#pragma once
#include <string.h>
@@ -84,5 +83,3 @@ class GHOST_EventKey : public GHOST_Event {
/** The key event data. */
GHOST_TEventKeyData m_keyEventData;
};
-
-#endif // __GHOST_EVENTKEY_H__
diff --git a/intern/ghost/intern/GHOST_EventManager.h b/intern/ghost/intern/GHOST_EventManager.h
index ada5abda89b..befbdc72a5c 100644
--- a/intern/ghost/intern/GHOST_EventManager.h
+++ b/intern/ghost/intern/GHOST_EventManager.h
@@ -22,8 +22,7 @@
* Declaration of GHOST_EventManager class.
*/
-#ifndef __GHOST_EVENTMANAGER_H__
-#define __GHOST_EVENTMANAGER_H__
+#pragma once
#include <deque>
#include <vector>
@@ -140,5 +139,3 @@ class GHOST_EventManager {
MEM_CXX_CLASS_ALLOC_FUNCS("GHOST:GHOST_EventManager")
#endif
};
-
-#endif // __GHOST_EVENTMANAGER_H__
diff --git a/intern/ghost/intern/GHOST_EventNDOF.h b/intern/ghost/intern/GHOST_EventNDOF.h
index 196d3868ccd..64e67434b74 100644
--- a/intern/ghost/intern/GHOST_EventNDOF.h
+++ b/intern/ghost/intern/GHOST_EventNDOF.h
@@ -18,8 +18,7 @@
* \ingroup GHOST
*/
-#ifndef __GHOST_EVENTNDOF_H__
-#define __GHOST_EVENTNDOF_H__
+#pragma once
#ifndef WITH_INPUT_NDOF
# error NDOF code included in non-NDOF-enabled build
@@ -50,5 +49,3 @@ class GHOST_EventNDOFButton : public GHOST_Event {
m_data = &m_buttonData;
}
};
-
-#endif // __GHOST_EVENTNDOF_H__
diff --git a/intern/ghost/intern/GHOST_EventPrinter.h b/intern/ghost/intern/GHOST_EventPrinter.h
index ead16525ec6..42de4da5ee5 100644
--- a/intern/ghost/intern/GHOST_EventPrinter.h
+++ b/intern/ghost/intern/GHOST_EventPrinter.h
@@ -22,8 +22,7 @@
* Declaration of GHOST_EventPrinter class.
*/
-#ifndef __GHOST_EVENTPRINTER_H__
-#define __GHOST_EVENTPRINTER_H__
+#pragma once
#include "GHOST_IEventConsumer.h"
@@ -48,5 +47,3 @@ class GHOST_EventPrinter : public GHOST_IEventConsumer {
*/
void getKeyString(GHOST_TKey key, char str[32]) const;
};
-
-#endif // __GHOST_EVENTPRINTER_H__
diff --git a/intern/ghost/intern/GHOST_EventString.h b/intern/ghost/intern/GHOST_EventString.h
index f0d3ffb9e91..8cd24a8a78b 100644
--- a/intern/ghost/intern/GHOST_EventString.h
+++ b/intern/ghost/intern/GHOST_EventString.h
@@ -22,8 +22,7 @@
* Declaration of GHOST_EventString class.
*/
-#ifndef __GHOST_EVENTSTRING_H__
-#define __GHOST_EVENTSTRING_H__
+#pragma once
#include "GHOST_Event.h"
@@ -54,5 +53,3 @@ class GHOST_EventString : public GHOST_Event {
free(m_data);
}
};
-
-#endif // __GHOST_EVENTSTRING_H__
diff --git a/intern/ghost/intern/GHOST_EventTrackpad.h b/intern/ghost/intern/GHOST_EventTrackpad.h
index 795e969b16d..a22f8a34fad 100644
--- a/intern/ghost/intern/GHOST_EventTrackpad.h
+++ b/intern/ghost/intern/GHOST_EventTrackpad.h
@@ -22,8 +22,7 @@
* Declaration of GHOST_EventTrackpad class.
*/
-#ifndef __GHOST_EVENTTRACKPAD_H__
-#define __GHOST_EVENTTRACKPAD_H__
+#pragma once
#include "GHOST_Event.h"
@@ -61,5 +60,3 @@ class GHOST_EventTrackpad : public GHOST_Event {
/** The mouse pan data */
GHOST_TEventTrackpadData m_trackpadEventData;
};
-
-#endif // _GHOST_EVENT_PAN_H_
diff --git a/intern/ghost/intern/GHOST_EventWheel.h b/intern/ghost/intern/GHOST_EventWheel.h
index 4d3eeb9cd83..ea62e02d08d 100644
--- a/intern/ghost/intern/GHOST_EventWheel.h
+++ b/intern/ghost/intern/GHOST_EventWheel.h
@@ -22,8 +22,7 @@
* Declaration of GHOST_EventWheel class.
*/
-#ifndef __GHOST_EVENTWHEEL_H__
-#define __GHOST_EVENTWHEEL_H__
+#pragma once
#include "GHOST_Event.h"
@@ -51,5 +50,3 @@ class GHOST_EventWheel : public GHOST_Event {
/** The z-displacement of the mouse wheel. */
GHOST_TEventWheelData m_wheelEventData;
};
-
-#endif // __GHOST_EVENTWHEEL_H__
diff --git a/intern/ghost/intern/GHOST_IXrGraphicsBinding.h b/intern/ghost/intern/GHOST_IXrGraphicsBinding.h
index b199c5f9b28..de8bf9f1a5a 100644
--- a/intern/ghost/intern/GHOST_IXrGraphicsBinding.h
+++ b/intern/ghost/intern/GHOST_IXrGraphicsBinding.h
@@ -18,8 +18,7 @@
* \ingroup GHOST
*/
-#ifndef __GHOST_IXRGRAPHICSBINDING_H__
-#define __GHOST_IXRGRAPHICSBINDING_H__
+#pragma once
#include <memory>
#include <string>
@@ -71,5 +70,3 @@ class GHOST_IXrGraphicsBinding {
std::unique_ptr<GHOST_IXrGraphicsBinding> GHOST_XrGraphicsBindingCreateFromType(
GHOST_TXrGraphicsBinding type, GHOST_Context *ghost_ctx);
-
-#endif /* __GHOST_IXRGRAPHICSBINDING_H__ */
diff --git a/intern/ghost/intern/GHOST_IconX11.h b/intern/ghost/intern/GHOST_IconX11.h
index c5bcf4bedeb..615a7dae6b5 100644
--- a/intern/ghost/intern/GHOST_IconX11.h
+++ b/intern/ghost/intern/GHOST_IconX11.h
@@ -22,8 +22,7 @@
* Icon image data for X11.
*/
-#ifndef __GHOST_ICONX11_H__
-#define __GHOST_ICONX11_H__
+#pragma once
/*
* import bpy
@@ -1013,5 +1012,3 @@ static const unsigned long BLENDER_ICONS_WM_X11[] = {
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
};
-
-#endif // __GHOST_ICONX11_H__
diff --git a/intern/ghost/intern/GHOST_ImeWin32.h b/intern/ghost/intern/GHOST_ImeWin32.h
index 112217023a7..74698d50659 100644
--- a/intern/ghost/intern/GHOST_ImeWin32.h
+++ b/intern/ghost/intern/GHOST_ImeWin32.h
@@ -23,8 +23,7 @@
* \ingroup GHOST
*/
-#ifndef __GHOST_IME_H__
-#define __GHOST_IME_H__
+#pragma once
#ifdef WITH_INPUT_IME
@@ -388,4 +387,3 @@ class GHOST_ImeWin32 {
};
#endif // WITH_INPUT_IME
-#endif // __GHOST_IME_H__
diff --git a/intern/ghost/intern/GHOST_ModifierKeys.h b/intern/ghost/intern/GHOST_ModifierKeys.h
index 27ad4034068..c41ce8b7f39 100644
--- a/intern/ghost/intern/GHOST_ModifierKeys.h
+++ b/intern/ghost/intern/GHOST_ModifierKeys.h
@@ -22,8 +22,7 @@
* Declaration of GHOST_ModifierKeys struct.
*/
-#ifndef __GHOST_MODIFIERKEYS_H__
-#define __GHOST_MODIFIERKEYS_H__
+#pragma once
#include "GHOST_Types.h"
@@ -87,5 +86,3 @@ struct GHOST_ModifierKeys {
/** Bitfield that stores the appropriate key state. */
GHOST_TUns8 m_OS : 1;
};
-
-#endif // __GHOST_MODIFIERKEYS_H__
diff --git a/intern/ghost/intern/GHOST_NDOFManager.h b/intern/ghost/intern/GHOST_NDOFManager.h
index a190607ca66..d0b49bc13c2 100644
--- a/intern/ghost/intern/GHOST_NDOFManager.h
+++ b/intern/ghost/intern/GHOST_NDOFManager.h
@@ -14,8 +14,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#ifndef __GHOST_NDOFMANAGER_H__
-#define __GHOST_NDOFMANAGER_H__
+#pragma once
#ifndef WITH_INPUT_NDOF
# error NDOF code included in non-NDOF-enabled build
@@ -167,5 +166,3 @@ class GHOST_NDOFManager {
bool m_motionEventPending;
float m_deadZone; // discard motion with each component < this
};
-
-#endif
diff --git a/intern/ghost/intern/GHOST_NDOFManagerCocoa.h b/intern/ghost/intern/GHOST_NDOFManagerCocoa.h
index bd1e6903f94..f7c3599502e 100644
--- a/intern/ghost/intern/GHOST_NDOFManagerCocoa.h
+++ b/intern/ghost/intern/GHOST_NDOFManagerCocoa.h
@@ -14,8 +14,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#ifndef __GHOST_NDOFMANAGERCOCOA_H__
-#define __GHOST_NDOFMANAGERCOCOA_H__
+#pragma once
#include "GHOST_NDOFManager.h"
@@ -29,5 +28,3 @@ class GHOST_NDOFManagerCocoa : public GHOST_NDOFManager {
bool available();
};
-
-#endif // #include guard
diff --git a/intern/ghost/intern/GHOST_NDOFManagerUnix.h b/intern/ghost/intern/GHOST_NDOFManagerUnix.h
index 75bd022631a..6dd4289ffac 100644
--- a/intern/ghost/intern/GHOST_NDOFManagerUnix.h
+++ b/intern/ghost/intern/GHOST_NDOFManagerUnix.h
@@ -14,8 +14,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#ifndef __GHOST_NDOFMANAGERUNIX_H__
-#define __GHOST_NDOFMANAGERUNIX_H__
+#pragma once
#include "GHOST_NDOFManager.h"
@@ -32,5 +31,3 @@ class GHOST_NDOFManagerUnix : public GHOST_NDOFManager {
private:
bool m_available;
};
-
-#endif /* __GHOST_NDOFMANAGERUNIX_H__ */
diff --git a/intern/ghost/intern/GHOST_NDOFManagerWin32.h b/intern/ghost/intern/GHOST_NDOFManagerWin32.h
index 9ed5e6ab978..62d9b9207dc 100644
--- a/intern/ghost/intern/GHOST_NDOFManagerWin32.h
+++ b/intern/ghost/intern/GHOST_NDOFManagerWin32.h
@@ -14,8 +14,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#ifndef __GHOST_NDOFMANAGERWIN32_H__
-#define __GHOST_NDOFMANAGERWIN32_H__
+#pragma once
#include "GHOST_NDOFManager.h"
@@ -24,5 +23,3 @@ class GHOST_NDOFManagerWin32 : public GHOST_NDOFManager {
GHOST_NDOFManagerWin32(GHOST_System &);
bool available();
};
-
-#endif // #include guard
diff --git a/intern/ghost/intern/GHOST_System.h b/intern/ghost/intern/GHOST_System.h
index c2d712c11cd..e29a9ba0c29 100644
--- a/intern/ghost/intern/GHOST_System.h
+++ b/intern/ghost/intern/GHOST_System.h
@@ -22,8 +22,7 @@
* Declaration of GHOST_System class.
*/
-#ifndef __GHOST_SYSTEM_H__
-#define __GHOST_SYSTEM_H__
+#pragma once
#include "GHOST_ISystem.h"
@@ -424,5 +423,3 @@ inline GHOST_NDOFManager *GHOST_System::getNDOFManager() const
return m_ndofManager;
}
#endif
-
-#endif // __GHOST_SYSTEM_H__
diff --git a/intern/ghost/intern/GHOST_SystemCocoa.h b/intern/ghost/intern/GHOST_SystemCocoa.h
index bbd6f1d8995..8e36cebb88a 100644
--- a/intern/ghost/intern/GHOST_SystemCocoa.h
+++ b/intern/ghost/intern/GHOST_SystemCocoa.h
@@ -22,8 +22,7 @@
* Declaration of GHOST_SystemCocoa class.
*/
-#ifndef __GHOST_SYSTEMCOCOA_H__
-#define __GHOST_SYSTEMCOCOA_H__
+#pragma once
#ifndef __APPLE__
# error Apple OSX only!
@@ -313,5 +312,3 @@ class GHOST_SystemCocoa : public GHOST_System {
/** Is the scroll wheel event generated by a multitouch trackpad or mouse? */
bool m_multiTouchScroll;
};
-
-#endif // __GHOST_SYSTEMCOCOA_H__
diff --git a/intern/ghost/intern/GHOST_SystemNULL.h b/intern/ghost/intern/GHOST_SystemNULL.h
index 186cb92d1aa..5becf110b15 100644
--- a/intern/ghost/intern/GHOST_SystemNULL.h
+++ b/intern/ghost/intern/GHOST_SystemNULL.h
@@ -19,8 +19,7 @@
* Declaration of GHOST_SystemNULL class.
*/
-#ifndef __GHOST_SYSTEMNULL_H__
-#define __GHOST_SYSTEMNULL_H__
+#pragma once
#include "../GHOST_Types.h"
#include "GHOST_DisplayManagerNULL.h"
@@ -130,5 +129,3 @@ class GHOST_SystemNULL : public GHOST_System {
((glSettings.flags & GHOST_glStereoVisual) != 0));
}
};
-
-#endif /* __GHOST_SYSTEMNULL_H__ */
diff --git a/intern/ghost/intern/GHOST_SystemPaths.h b/intern/ghost/intern/GHOST_SystemPaths.h
index 04180a143cb..ab53b2813cd 100644
--- a/intern/ghost/intern/GHOST_SystemPaths.h
+++ b/intern/ghost/intern/GHOST_SystemPaths.h
@@ -21,8 +21,7 @@
* \ingroup GHOST
*/
-#ifndef __GHOST_SYSTEMPATHS_H__
-#define __GHOST_SYSTEMPATHS_H__
+#pragma once
#include "GHOST_ISystemPaths.h"
@@ -70,5 +69,3 @@ class GHOST_SystemPaths : public GHOST_ISystemPaths {
*/
virtual void addToSystemRecentFiles(const char *filename) const = 0;
};
-
-#endif
diff --git a/intern/ghost/intern/GHOST_SystemPathsCocoa.h b/intern/ghost/intern/GHOST_SystemPathsCocoa.h
index b66379649e7..188f6f02286 100644
--- a/intern/ghost/intern/GHOST_SystemPathsCocoa.h
+++ b/intern/ghost/intern/GHOST_SystemPathsCocoa.h
@@ -21,8 +21,7 @@
* \ingroup GHOST
*/
-#ifndef __GHOST_SYSTEMPATHSCOCOA_H__
-#define __GHOST_SYSTEMPATHSCOCOA_H__
+#pragma once
#ifndef __APPLE__
# error Apple OSX only!
@@ -67,5 +66,3 @@ class GHOST_SystemPathsCocoa : public GHOST_SystemPaths {
*/
void addToSystemRecentFiles(const char *filename) const;
};
-
-#endif // __GHOST_SYSTEMPATHSCOCOA_H__
diff --git a/intern/ghost/intern/GHOST_SystemPathsUnix.h b/intern/ghost/intern/GHOST_SystemPathsUnix.h
index f9f89f6e79b..8d2f26a28aa 100644
--- a/intern/ghost/intern/GHOST_SystemPathsUnix.h
+++ b/intern/ghost/intern/GHOST_SystemPathsUnix.h
@@ -21,8 +21,7 @@
* \ingroup GHOST
*/
-#ifndef __GHOST_SYSTEMPATHSUNIX_H__
-#define __GHOST_SYSTEMPATHSUNIX_H__
+#pragma once
#include "../GHOST_Types.h"
#include "GHOST_SystemPaths.h"
@@ -65,5 +64,3 @@ class GHOST_SystemPathsUnix : public GHOST_SystemPaths {
*/
void addToSystemRecentFiles(const char *filename) const;
};
-
-#endif /* __GHOST_SYSTEMPATHSUNIX_H__ */
diff --git a/intern/ghost/intern/GHOST_SystemPathsWin32.h b/intern/ghost/intern/GHOST_SystemPathsWin32.h
index f1924ea51bc..1a1eab21bad 100644
--- a/intern/ghost/intern/GHOST_SystemPathsWin32.h
+++ b/intern/ghost/intern/GHOST_SystemPathsWin32.h
@@ -21,8 +21,7 @@
* \ingroup GHOST
*/
-#ifndef __GHOST_SYSTEMPATHSWIN32_H__
-#define __GHOST_SYSTEMPATHSWIN32_H__
+#pragma once
#ifndef WIN32
# error WIN32 only!
@@ -74,5 +73,3 @@ class GHOST_SystemPathsWin32 : public GHOST_SystemPaths {
*/
void addToSystemRecentFiles(const char *filename) const;
};
-
-#endif // __GHOST_SYSTEMPATHSWIN32_H__
diff --git a/intern/ghost/intern/GHOST_SystemSDL.h b/intern/ghost/intern/GHOST_SystemSDL.h
index 8feec9de61d..4b2c52f8282 100644
--- a/intern/ghost/intern/GHOST_SystemSDL.h
+++ b/intern/ghost/intern/GHOST_SystemSDL.h
@@ -19,8 +19,7 @@
* Declaration of GHOST_SystemSDL class.
*/
-#ifndef __GHOST_SYSTEMSDL_H__
-#define __GHOST_SYSTEMSDL_H__
+#pragma once
#include "../GHOST_Types.h"
#include "GHOST_DisplayManagerSDL.h"
@@ -102,5 +101,3 @@ class GHOST_SystemSDL : public GHOST_System {
/// The vector of windows that need to be updated.
std::vector<GHOST_WindowSDL *> m_dirty_windows;
};
-
-#endif
diff --git a/intern/ghost/intern/GHOST_SystemWayland.h b/intern/ghost/intern/GHOST_SystemWayland.h
index 89cd3406b69..30ee7679287 100644
--- a/intern/ghost/intern/GHOST_SystemWayland.h
+++ b/intern/ghost/intern/GHOST_SystemWayland.h
@@ -19,8 +19,7 @@
* Declaration of GHOST_SystemWayland class.
*/
-#ifndef __GHOST_SYSTEMWAYLAND_H__
-#define __GHOST_SYSTEMWAYLAND_H__
+#pragma once
#include "../GHOST_Types.h"
#include "GHOST_System.h"
@@ -107,5 +106,3 @@ class GHOST_SystemWayland : public GHOST_System {
struct display_t *d;
std::string selection;
};
-
-#endif /* __GHOST_SYSTEMWAYLAND_H__ */
diff --git a/intern/ghost/intern/GHOST_SystemWin32.cpp b/intern/ghost/intern/GHOST_SystemWin32.cpp
index 849aa5a96f5..db26bd6a614 100644
--- a/intern/ghost/intern/GHOST_SystemWin32.cpp
+++ b/intern/ghost/intern/GHOST_SystemWin32.cpp
@@ -1144,9 +1144,13 @@ GHOST_EventKey *GHOST_SystemWin32::processKeyEvent(GHOST_WindowWin32 *window, RA
int r;
GetKeyboardState((PBYTE)state);
+ /* No text with control key pressed. */
+ if (state[VK_CONTROL] & 0x80) {
+ utf8_char[0] = '\0';
+ }
// Don't call ToUnicodeEx on dead keys as it clears the buffer and so won't allow diacritical
// composition.
- if (MapVirtualKeyW(vk, 2) != 0) {
+ else if (MapVirtualKeyW(vk, 2) != 0) {
// todo: ToUnicodeEx can respond with up to 4 utf16 chars (only 2 here).
// Could be up to 24 utf8 bytes.
if ((r = ToUnicodeEx(
diff --git a/intern/ghost/intern/GHOST_SystemWin32.h b/intern/ghost/intern/GHOST_SystemWin32.h
index 6b7901c2ade..24925b9c403 100644
--- a/intern/ghost/intern/GHOST_SystemWin32.h
+++ b/intern/ghost/intern/GHOST_SystemWin32.h
@@ -22,8 +22,7 @@
* Declaration of GHOST_SystemWin32 class.
*/
-#ifndef __GHOST_SYSTEMWIN32_H__
-#define __GHOST_SYSTEMWIN32_H__
+#pragma once
#ifndef WIN32
# error WIN32 only!
@@ -488,4 +487,3 @@ inline void GHOST_SystemWin32::handleKeyboardChange(void)
}
}
}
-#endif // __GHOST_SYSTEMWIN32_H__
diff --git a/intern/ghost/intern/GHOST_SystemX11.cpp b/intern/ghost/intern/GHOST_SystemX11.cpp
index 5c1f34e3a63..74bdff3812e 100644
--- a/intern/ghost/intern/GHOST_SystemX11.cpp
+++ b/intern/ghost/intern/GHOST_SystemX11.cpp
@@ -1324,7 +1324,7 @@ void GHOST_SystemX11::processEvent(XEvent *xe)
int revert_to;
/* as ICCCM say, we need reply this event
- * with a SetInputFocus, the data[1] have
+ * with a #SetInputFocus, the data[1] have
* the valid timestamp (send by the wm).
*
* Some WM send this event before the
@@ -1345,7 +1345,7 @@ void GHOST_SystemX11::processEvent(XEvent *xe)
else {
#ifdef WITH_XDND
/* try to handle drag event
- * (if there's no such events, GHOST_HandleClientMessage will return zero) */
+ * (if there's no such events, #GHOST_HandleClientMessage will return zero) */
if (window->getDropTarget()->GHOST_HandleClientMessage(xe) == false) {
/* Unknown client message, ignore */
}
@@ -1366,12 +1366,12 @@ void GHOST_SystemX11::processEvent(XEvent *xe)
case EnterNotify:
case LeaveNotify: {
- /* XCrossingEvents pointer leave enter window.
- * also do cursor move here, MotionNotify only
+ /* #XCrossingEvents pointer leave enter window.
+ * also do cursor move here, #MotionNotify only
* happens when motion starts & ends inside window.
* we only do moves when the crossing mode is 'normal'
- * (really crossing between windows) since some windowmanagers
- * also send grab/ungrab crossings for mousewheel events.
+ * (really crossing between windows) since some window-managers
+ * also send grab/un-grab crossings for mouse-wheel events.
*/
XCrossingEvent &xce = xe->xcrossing;
if (xce.mode == NotifyNormal) {
@@ -1396,11 +1396,11 @@ void GHOST_SystemX11::processEvent(XEvent *xe)
case MapNotify:
/*
* From ICCCM:
- * [ Clients can select for StructureNotify on their
+ * [ Clients can select for #StructureNotify on their
* top-level windows to track transition between
- * Normal and Iconic states. Receipt of a MapNotify
+ * Normal and Iconic states. Receipt of a #MapNotify
* event will indicate a transition to the Normal
- * state, and receipt of an UnmapNotify event will
+ * state, and receipt of an #UnmapNotify event will
* indicate a transition to the Iconic state. ]
*/
if (window->m_post_init == True) {
@@ -1441,7 +1441,7 @@ void GHOST_SystemX11::processEvent(XEvent *xe)
nxe.xselection.target = xse->target;
nxe.xselection.time = xse->time;
- /* Check to see if the requestor is asking for String */
+ /* Check to see if the requester is asking for String */
if (xse->target == utf8_string || xse->target == string || xse->target == compound_text ||
xse->target == c_string) {
if (xse->selection == XInternAtom(m_display, "PRIMARY", False)) {
@@ -1487,7 +1487,7 @@ void GHOST_SystemX11::processEvent(XEvent *xe)
nxe.xselection.property = None;
}
- /* Send the event to the client 0 0 == False, SelectionNotify */
+ /* Send the event to the client 0 0 == False, #SelectionNotify */
XSendEvent(m_display, xse->requestor, 0, 0, &nxe);
XFlush(m_display);
break;
@@ -1513,7 +1513,7 @@ void GHOST_SystemX11::processEvent(XEvent *xe)
/* Note: This event might be generated with incomplete data-set
* (don't exactly know why, looks like in some cases, if the value does not change,
- * it is not included in subsequent XDeviceMotionEvent events).
+ * it is not included in subsequent #XDeviceMotionEvent events).
* So we have to check which values this event actually contains!
*/
@@ -1569,14 +1569,13 @@ void GHOST_SystemX11::processEvent(XEvent *xe)
GHOST_TSuccess GHOST_SystemX11::getModifierKeys(GHOST_ModifierKeys &keys) const
{
- /* Analyze the masks returned from XQueryPointer. */
+ /* Analyze the masks returned from #XQueryPointer. */
memset((void *)m_keyboard_vector, 0, sizeof(m_keyboard_vector));
XQueryKeymap(m_display, (char *)m_keyboard_vector);
- /* now translate key symbols into keycodes and
- * test with vector. */
+ /* Now translate key symbols into key-codes and test with vector. */
const static KeyCode shift_l = XKeysymToKeycode(m_display, XK_Shift_L);
const static KeyCode shift_r = XKeysymToKeycode(m_display, XK_Shift_R);
@@ -1671,7 +1670,7 @@ GHOST_TSuccess GHOST_SystemX11::setCursorPosition(GHOST_TInt32 x, GHOST_TInt32 y
{
/* This is a brute force move in screen coordinates
- * XWarpPointer does relative moves so first determine the
+ * #XWarpPointer does relative moves so first determine the
* current pointer position. */
int cx, cy;
@@ -1952,7 +1951,7 @@ void GHOST_SystemX11::getClipboard_xcout(const XEvent *evt,
switch (*context) {
/* There is no context, do an XConvertSelection() */
case XCLIB_XCOUT_NONE:
- /* Initialise return length to 0 */
+ /* Initialize return length to 0. */
if (*len > 0) {
free(*txt);
*len = 0;
diff --git a/intern/ghost/intern/GHOST_SystemX11.h b/intern/ghost/intern/GHOST_SystemX11.h
index 5888605ec95..ad58138d416 100644
--- a/intern/ghost/intern/GHOST_SystemX11.h
+++ b/intern/ghost/intern/GHOST_SystemX11.h
@@ -22,8 +22,7 @@
* Declaration of GHOST_SystemX11 class.
*/
-#ifndef __GHOST_SYSTEMX11_H__
-#define __GHOST_SYSTEMX11_H__
+#pragma once
#include <X11/XKBlib.h> /* allow detectable autorepeate */
#include <X11/Xlib.h>
@@ -392,5 +391,3 @@ class GHOST_SystemX11 : public GHOST_System {
bool generateWindowExposeEvents();
};
-
-#endif
diff --git a/intern/ghost/intern/GHOST_TaskbarWin32.h b/intern/ghost/intern/GHOST_TaskbarWin32.h
index 58641123c24..e6464f5e626 100644
--- a/intern/ghost/intern/GHOST_TaskbarWin32.h
+++ b/intern/ghost/intern/GHOST_TaskbarWin32.h
@@ -17,8 +17,7 @@
/** \file
* \ingroup GHOST
*/
-#ifndef __GHOST_TASKBARWIN32_H__
-#define __GHOST_TASKBARWIN32_H__
+#pragma once
#ifndef WIN32
# error WIN32 only!
@@ -128,5 +127,3 @@ class ITaskbarList3 : public ITaskbarList2 {
virtual HRESULT STDMETHODCALLTYPE SetThumbnailClip(HWND hwnd, RECT *prcClip) = 0;
};
#endif /* ITaskbarList3 */
-
-#endif /*__GHOST_TASKBARWIN32_H__*/
diff --git a/intern/ghost/intern/GHOST_TaskbarX11.h b/intern/ghost/intern/GHOST_TaskbarX11.h
index cd00e25106c..25de5aa9511 100644
--- a/intern/ghost/intern/GHOST_TaskbarX11.h
+++ b/intern/ghost/intern/GHOST_TaskbarX11.h
@@ -17,8 +17,7 @@
/** \file
* \ingroup GHOST
*/
-#ifndef __GHOST_TASKBARX11_H__
-#define __GHOST_TASKBARX11_H__
+#pragma once
class GHOST_TaskBarX11 {
public:
@@ -34,5 +33,3 @@ class GHOST_TaskBarX11 {
private:
void *handle;
};
-
-#endif /*__GHOST_TASKBARX11_H__*/
diff --git a/intern/ghost/intern/GHOST_TimerManager.h b/intern/ghost/intern/GHOST_TimerManager.h
index 039663a7a0e..2e0f5d42230 100644
--- a/intern/ghost/intern/GHOST_TimerManager.h
+++ b/intern/ghost/intern/GHOST_TimerManager.h
@@ -22,8 +22,7 @@
* Declaration of GHOST_TimerManager class.
*/
-#ifndef __GHOST_TIMERMANAGER_H__
-#define __GHOST_TIMERMANAGER_H__
+#pragma once
#include <vector>
@@ -112,5 +111,3 @@ class GHOST_TimerManager {
MEM_CXX_CLASS_ALLOC_FUNCS("GHOST:GHOST_TimerManager")
#endif
};
-
-#endif // __GHOST_TIMERMANAGER_H__
diff --git a/intern/ghost/intern/GHOST_TimerTask.h b/intern/ghost/intern/GHOST_TimerTask.h
index 561d9b3e705..6dc0728e19b 100644
--- a/intern/ghost/intern/GHOST_TimerTask.h
+++ b/intern/ghost/intern/GHOST_TimerTask.h
@@ -22,8 +22,7 @@
* Declaration of GHOST_TimerTask class.
*/
-#ifndef __GHOST_TIMERTASK_H__
-#define __GHOST_TIMERTASK_H__
+#pragma once
#include "GHOST_ITimerTask.h"
@@ -179,5 +178,3 @@ class GHOST_TimerTask : public GHOST_ITimerTask {
/** Auxiliary storage room. */
GHOST_TUns32 m_auxData;
};
-
-#endif // __GHOST_TIMERTASK_H__
diff --git a/intern/ghost/intern/GHOST_Window.h b/intern/ghost/intern/GHOST_Window.h
index 6738aa850ce..c8c21b2b08f 100644
--- a/intern/ghost/intern/GHOST_Window.h
+++ b/intern/ghost/intern/GHOST_Window.h
@@ -22,8 +22,7 @@
* Declaration of GHOST_Window class.
*/
-#ifndef __GHOST_WINDOW_H__
-#define __GHOST_WINDOW_H__
+#pragma once
#include "GHOST_IWindow.h"
@@ -124,8 +123,8 @@ class GHOST_Window : public GHOST_IWindow {
* Set the shape of the cursor to a custom cursor.
* \param bitmap The bitmap data for the cursor.
* \param mask The mask data for the cursor.
- * \param hotX The X coordinate of the cursor hotspot.
- * \param hotY The Y coordinate of the cursor hotspot.
+ * \param hotX The X coordinate of the cursor hot-spot.
+ * \param hotY The Y coordinate of the cursor hot-spot.
* \return Indication of success.
*/
GHOST_TSuccess setCustomCursorShape(GHOST_TUns8 *bitmap,
@@ -456,5 +455,3 @@ inline GHOST_TStandardCursor GHOST_Window::getCursorShape() const
{
return m_cursorShape;
}
-
-#endif // _GHOST_WINDOW_H
diff --git a/intern/ghost/intern/GHOST_WindowCocoa.h b/intern/ghost/intern/GHOST_WindowCocoa.h
index 15429eab5db..97486c9e77a 100644
--- a/intern/ghost/intern/GHOST_WindowCocoa.h
+++ b/intern/ghost/intern/GHOST_WindowCocoa.h
@@ -22,8 +22,7 @@
* Declaration of GHOST_WindowCocoa class.
*/
-#ifndef __GHOST_WINDOWCOCOA_H__
-#define __GHOST_WINDOWCOCOA_H__
+#pragma once
#ifndef __APPLE__
# error Apple OSX only!
@@ -327,5 +326,3 @@ class GHOST_WindowCocoa : public GHOST_Window {
bool m_debug_context; // for debug messages during context setup
bool m_is_dialog;
};
-
-#endif // __GHOST_WINDOWCOCOA_H__
diff --git a/intern/ghost/intern/GHOST_WindowManager.h b/intern/ghost/intern/GHOST_WindowManager.h
index 661439191c5..34fdfd30f27 100644
--- a/intern/ghost/intern/GHOST_WindowManager.h
+++ b/intern/ghost/intern/GHOST_WindowManager.h
@@ -22,8 +22,7 @@
* Declaration of GHOST_WindowManager class.
*/
-#ifndef __GHOST_WINDOWMANAGER_H__
-#define __GHOST_WINDOWMANAGER_H__
+#pragma once
#include <vector>
@@ -149,5 +148,3 @@ class GHOST_WindowManager {
MEM_CXX_CLASS_ALLOC_FUNCS("GHOST:GHOST_WindowManager")
#endif
};
-
-#endif // __GHOST_WINDOWMANAGER_H__
diff --git a/intern/ghost/intern/GHOST_WindowNULL.h b/intern/ghost/intern/GHOST_WindowNULL.h
index e1aa0cb7f13..0b5a7ee3450 100644
--- a/intern/ghost/intern/GHOST_WindowNULL.h
+++ b/intern/ghost/intern/GHOST_WindowNULL.h
@@ -19,8 +19,7 @@
* Declaration of GHOST_WindowNULL class.
*/
-#ifndef __GHOST_WINDOWNULL_H__
-#define __GHOST_WINDOWNULL_H__
+#pragma once
#include "GHOST_Window.h"
@@ -177,5 +176,3 @@ class GHOST_WindowNULL : public GHOST_Window {
return NULL;
}
};
-
-#endif // __GHOST_WINDOWNULL_H__
diff --git a/intern/ghost/intern/GHOST_WindowSDL.h b/intern/ghost/intern/GHOST_WindowSDL.h
index 5039c742c9d..643c54c282e 100644
--- a/intern/ghost/intern/GHOST_WindowSDL.h
+++ b/intern/ghost/intern/GHOST_WindowSDL.h
@@ -19,8 +19,7 @@
* Declaration of GHOST_WindowSDL class.
*/
-#ifndef __GHOST_WINDOWSDL_H__
-#define __GHOST_WINDOWSDL_H__
+#pragma once
#include "GHOST_SystemSDL.h"
#include "GHOST_Window.h"
@@ -149,5 +148,3 @@ class GHOST_WindowSDL : public GHOST_Window {
GHOST_TUns16 getDPIHint();
};
-
-#endif // __GHOST_WINDOWSDL_H__
diff --git a/intern/ghost/intern/GHOST_WindowWayland.cpp b/intern/ghost/intern/GHOST_WindowWayland.cpp
index ef02db7abc3..fe65162d168 100644
--- a/intern/ghost/intern/GHOST_WindowWayland.cpp
+++ b/intern/ghost/intern/GHOST_WindowWayland.cpp
@@ -180,6 +180,10 @@ GHOST_WindowWayland::GHOST_WindowWayland(GHOST_SystemWayland *system,
wl_surface_commit(w->surface);
wl_display_roundtrip(m_system->display());
+#ifdef GHOST_OPENGL_ALPHA
+ setOpaque();
+#endif
+
setState(state);
setTitle(title);
@@ -214,6 +218,10 @@ GHOST_TSuccess GHOST_WindowWayland::deactivate()
GHOST_TSuccess GHOST_WindowWayland::notify_size()
{
+#ifdef GHOST_OPENGL_ALPHA
+ setOpaque();
+#endif
+
return m_system->pushEvent(
new GHOST_Event(m_system->getMilliSeconds(), GHOST_kEventWindowSize, this));
}
@@ -385,6 +393,19 @@ bool GHOST_WindowWayland::isDialog() const
return w->is_dialog;
}
+#ifdef GHOST_OPENGL_ALPHA
+void GHOST_WindowWayland::setOpaque() const
+{
+ struct wl_region *region;
+
+ /* Make the window opaque. */
+ region = wl_compositor_create_region(m_system->compositor());
+ wl_region_add(region, 0, 0, w->width, w->height);
+ wl_surface_set_opaque_region(w->surface, region);
+ wl_region_destroy(region);
+}
+#endif
+
/**
* \param type The type of rendering context create.
* \return Indication of success.
diff --git a/intern/ghost/intern/GHOST_WindowWayland.h b/intern/ghost/intern/GHOST_WindowWayland.h
index 23e55fcd6e4..1ee41f4d0f6 100644
--- a/intern/ghost/intern/GHOST_WindowWayland.h
+++ b/intern/ghost/intern/GHOST_WindowWayland.h
@@ -20,8 +20,7 @@
* Declaration of GHOST_WindowWayland class.
*/
-#ifndef __GHOST_WINDOWWAYLAND_H__
-#define __GHOST_WINDOWWAYLAND_H__
+#pragma once
#include "GHOST_Window.h"
@@ -109,6 +108,10 @@ class GHOST_WindowWayland : public GHOST_Window {
bool isDialog() const override;
+#ifdef GHOST_OPENGL_ALPHA
+ void setOpaque() const;
+#endif
+
private:
GHOST_SystemWayland *m_system;
struct window_t *w;
@@ -120,5 +123,3 @@ class GHOST_WindowWayland : public GHOST_Window {
*/
GHOST_Context *newDrawingContext(GHOST_TDrawingContextType type) override;
};
-
-#endif // __GHOST_WINDOWWAYLAND_H__
diff --git a/intern/ghost/intern/GHOST_WindowWin32.h b/intern/ghost/intern/GHOST_WindowWin32.h
index dbed7c5ee5f..224ff53bf7b 100644
--- a/intern/ghost/intern/GHOST_WindowWin32.h
+++ b/intern/ghost/intern/GHOST_WindowWin32.h
@@ -22,8 +22,7 @@
* Declaration of GHOST_WindowWin32 class.
*/
-#ifndef __GHOST_WINDOWWIN32_H__
-#define __GHOST_WINDOWWIN32_H__
+#pragma once
#ifndef WIN32
# error WIN32 only!
@@ -586,5 +585,3 @@ class GHOST_WindowWin32 : public GHOST_Window {
#endif
bool m_debug_context;
};
-
-#endif // __GHOST_WINDOWWIN32_H__
diff --git a/intern/ghost/intern/GHOST_WindowX11.h b/intern/ghost/intern/GHOST_WindowX11.h
index 4232ff40b52..ef5d1755f1a 100644
--- a/intern/ghost/intern/GHOST_WindowX11.h
+++ b/intern/ghost/intern/GHOST_WindowX11.h
@@ -22,8 +22,7 @@
* Declaration of GHOST_WindowX11 class.
*/
-#ifndef __GHOST_WINDOWX11_H__
-#define __GHOST_WINDOWX11_H__
+#pragma once
#include "GHOST_Window.h"
#include <X11/Xlib.h>
@@ -288,5 +287,3 @@ class GHOST_WindowX11 : public GHOST_Window {
void motifFullScreen(bool set);
bool motifIsFullScreen() const;
};
-
-#endif // __GHOST_WINDOWX11_H__
diff --git a/intern/ghost/intern/GHOST_XrContext.h b/intern/ghost/intern/GHOST_XrContext.h
index 9be57cd90cc..d2edb40c080 100644
--- a/intern/ghost/intern/GHOST_XrContext.h
+++ b/intern/ghost/intern/GHOST_XrContext.h
@@ -18,8 +18,7 @@
* \ingroup GHOST
*/
-#ifndef __GHOST_XRCONTEXT_H__
-#define __GHOST_XRCONTEXT_H__
+#pragma once
#include <memory>
#include <vector>
@@ -131,5 +130,3 @@ class GHOST_XrContext : public GHOST_IXrContext {
GHOST_TXrGraphicsBinding determineGraphicsBindingTypeToEnable(
const GHOST_XrContextCreateInfo *create_info);
};
-
-#endif // __GHOST_XRCONTEXT_H__
diff --git a/intern/ghost/intern/GHOST_XrException.h b/intern/ghost/intern/GHOST_XrException.h
index 9f779961e4f..30c33eaf98f 100644
--- a/intern/ghost/intern/GHOST_XrException.h
+++ b/intern/ghost/intern/GHOST_XrException.h
@@ -18,8 +18,7 @@
* \ingroup GHOST
*/
-#ifndef __GHOST_XREXCEPTION_H__
-#define __GHOST_XREXCEPTION_H__
+#pragma once
#include <exception>
@@ -41,5 +40,3 @@ class GHOST_XrException : public std::exception {
const char *m_msg;
int m_result;
};
-
-#endif // __GHOST_XREXCEPTION_H__
diff --git a/intern/ghost/intern/GHOST_XrSession.h b/intern/ghost/intern/GHOST_XrSession.h
index da0128b2851..74555c0c170 100644
--- a/intern/ghost/intern/GHOST_XrSession.h
+++ b/intern/ghost/intern/GHOST_XrSession.h
@@ -18,8 +18,7 @@
* \ingroup GHOST
*/
-#ifndef __GHOST_XRSESSION_H__
-#define __GHOST_XRSESSION_H__
+#pragma once
#include <map>
#include <memory>
@@ -84,5 +83,3 @@ class GHOST_XrSession {
void beginFrameDrawing();
void endFrameDrawing(std::vector<XrCompositionLayerBaseHeader *> *layers);
};
-
-#endif /* GHOST_XRSESSION_H__ */
diff --git a/intern/ghost/intern/GHOST_XrSwapchain.h b/intern/ghost/intern/GHOST_XrSwapchain.h
index 7a3e7fcea68..33a1c17b993 100644
--- a/intern/ghost/intern/GHOST_XrSwapchain.h
+++ b/intern/ghost/intern/GHOST_XrSwapchain.h
@@ -18,8 +18,7 @@
* \ingroup GHOST
*/
-#ifndef __GHOST_XRSWAPCHAIN_H__
-#define __GHOST_XRSWAPCHAIN_H__
+#pragma once
#include <memory>
@@ -45,5 +44,3 @@ class GHOST_XrSwapchain {
int32_t m_image_width, m_image_height;
bool m_is_srgb_buffer = false;
};
-
-#endif // GHOST_XRSWAPCHAIN_H
diff --git a/intern/ghost/intern/GHOST_Xr_intern.h b/intern/ghost/intern/GHOST_Xr_intern.h
index d59ffd31940..137541c4528 100644
--- a/intern/ghost/intern/GHOST_Xr_intern.h
+++ b/intern/ghost/intern/GHOST_Xr_intern.h
@@ -18,8 +18,7 @@
* \ingroup GHOST
*/
-#ifndef __GHOST_XR_INTERN_H__
-#define __GHOST_XR_INTERN_H__
+#pragma once
#include <memory>
#include <vector>
@@ -46,5 +45,3 @@
(void)_res; \
} \
(void)0
-
-#endif /* __GHOST_XR_INTERN_H__ */
diff --git a/intern/ghost/intern/GHOST_Xr_openxr_includes.h b/intern/ghost/intern/GHOST_Xr_openxr_includes.h
index 9cac43b1549..d1deaeb0d1a 100644
--- a/intern/ghost/intern/GHOST_Xr_openxr_includes.h
+++ b/intern/ghost/intern/GHOST_Xr_openxr_includes.h
@@ -22,8 +22,7 @@
* installed.
*/
-#ifndef __GHOST_XR_SYSTEM_INCLUDES_H__
-#define __GHOST_XR_SYSTEM_INCLUDES_H__
+#pragma once
/* Platform headers */
#ifdef XR_USE_PLATFORM_WIN32
@@ -48,5 +47,3 @@
#include <openxr/openxr.h>
#include <openxr/openxr_platform.h>
-
-#endif /* __GHOST_XR_SYSTEM_INCLUDES_H__ */