Browse Source

Minor cleanups

tags/2021-05-28
jules 10 years ago
parent
commit
0c99e8e068
5 changed files with 23 additions and 21 deletions
  1. +1
    -1
      modules/juce_gui_basics/components/juce_Component.cpp
  2. +2
    -2
      modules/juce_gui_basics/native/juce_linux_Clipboard.cpp
  3. +18
    -16
      modules/juce_gui_basics/native/juce_linux_Windowing.cpp
  4. +1
    -1
      modules/juce_gui_extra/native/juce_linux_SystemTrayIcon.cpp
  5. +1
    -1
      modules/juce_opengl/native/juce_OpenGL_linux.h

+ 1
- 1
modules/juce_gui_basics/components/juce_Component.cpp View File

@@ -154,7 +154,7 @@ private:
bool shouldBailOut() const noexcept
{
return checker.shouldBailOut() || safePointer == 0;
return checker.shouldBailOut() || safePointer == nullptr;
}
private:


+ 2
- 2
modules/juce_gui_basics/native/juce_linux_Clipboard.cpp View File

@@ -22,8 +22,8 @@
==============================================================================
*/
extern Display* display;
extern Window juce_messageWindowHandle;
extern ::Display* display;
extern ::Window juce_messageWindowHandle;
namespace ClipboardHelpers
{


+ 18
- 16
modules/juce_gui_basics/native/juce_linux_Windowing.cpp View File

@@ -22,7 +22,7 @@
==============================================================================
*/
extern Display* display;
extern ::Display* display;
extern XContext windowHandleXContext;
typedef void (*WindowMessageReceiveCallback) (XEvent&);
extern WindowMessageReceiveCallback dispatchWindowMessage;
@@ -775,7 +775,7 @@ class DisplayGeometry
{
private:
//==============================================================================
DisplayGeometry (::Display *dpy, double masterScale)
DisplayGeometry (::Display* dpy, double masterScale)
{
jassert (instance == nullptr);
instance = this;
@@ -912,19 +912,20 @@ public:
}
//==============================================================================
static DisplayGeometry& getInstance ()
static DisplayGeometry& getInstance()
{
jassert (instance != nullptr);
return *instance;
}
static DisplayGeometry& getOrCreateInstance (::Display *dpy, double masterScale)
static DisplayGeometry& getOrCreateInstance (::Display* dpy, double masterScale)
{
if (instance == nullptr)
new DisplayGeometry (dpy, masterScale);
return getInstance();
}
private:
//==============================================================================
static DisplayGeometry* instance;
@@ -1027,7 +1028,7 @@ private:
}
//==============================================================================
XRRScreenResources* getScreenResources (::Display *dpy, ::Window window)
XRRScreenResources* getScreenResources (::Display* dpy, ::Window window)
{
if (getScreenResourcesPtr != nullptr)
return getScreenResourcesPtr (dpy, window);
@@ -1035,7 +1036,7 @@ private:
return nullptr;
}
XRROutputInfo* getOutputInfo (::Display *dpy, XRRScreenResources *resources, RROutput output)
XRROutputInfo* getOutputInfo (::Display* dpy, XRRScreenResources* resources, RROutput output)
{
if (getOutputInfoPtr != nullptr)
return getOutputInfoPtr (dpy, resources, output);
@@ -1043,7 +1044,7 @@ private:
return nullptr;
}
XRRCrtcInfo* getCrtcInfo (::Display *dpy, XRRScreenResources *resources, RRCrtc crtc)
XRRCrtcInfo* getCrtcInfo (::Display* dpy, XRRScreenResources* resources, RRCrtc crtc)
{
if (getCrtcInfoPtr != nullptr)
return getCrtcInfoPtr (dpy, resources, crtc);
@@ -1051,13 +1052,14 @@ private:
return nullptr;
}
RROutput getOutputPrimary (::Display *dpy, ::Window window)
RROutput getOutputPrimary (::Display* dpy, ::Window window)
{
if (getOutputPrimaryPtr != nullptr)
return getOutputPrimaryPtr (dpy, window);
return 0;
}
private:
//==============================================================================
friend class ContainerDeletePolicy<XRRScreenResources>;
@@ -1084,13 +1086,13 @@ private:
private:
static XRandrWrapper* instance;
typedef XRRScreenResources* (*tXRRGetScreenResources) (::Display *dpy, ::Window window);
typedef void (*tXRRFreeScreenResources) (XRRScreenResources *resources);
typedef XRROutputInfo* (*tXRRGetOutputInfo) (::Display *dpy, XRRScreenResources *resources, RROutput output);
typedef void (*tXRRFreeOutputInfo) (XRROutputInfo *outputInfo);
typedef XRRCrtcInfo* (*tXRRGetCrtcInfo) (::Display *dpy, XRRScreenResources *resources, RRCrtc crtc);
typedef void (*tXRRFreeCrtcInfo) (XRRCrtcInfo *crtcInfo);
typedef RROutput (*tXRRGetOutputPrimary) (::Display *dpy, ::Window window);
typedef XRRScreenResources* (*tXRRGetScreenResources) (::Display*, ::Window);
typedef void (*tXRRFreeScreenResources) (XRRScreenResources*);
typedef XRROutputInfo* (*tXRRGetOutputInfo) (::Display*, XRRScreenResources*, RROutput);
typedef void (*tXRRFreeOutputInfo) (XRROutputInfo*);
typedef XRRCrtcInfo* (*tXRRGetCrtcInfo) (::Display*, XRRScreenResources*, RRCrtc);
typedef void (*tXRRFreeCrtcInfo) (XRRCrtcInfo*);
typedef RROutput (*tXRRGetOutputPrimary) (::Display*, ::Window);
void* libXrandr;
tXRRGetScreenResources getScreenResourcesPtr;
@@ -1172,7 +1174,7 @@ private:
}
//==============================================================================
void queryDisplayInfos (::Display *dpy, double masterScale) noexcept
void queryDisplayInfos (::Display* dpy, double masterScale) noexcept
{
ScopedXLock xlock;


+ 1
- 1
modules/juce_gui_extra/native/juce_linux_SystemTrayIcon.cpp View File

@@ -22,7 +22,7 @@
==============================================================================
*/
extern Display* display;
extern ::Display* display;
//==============================================================================
class SystemTrayIconComponent::Pimpl


+ 1
- 1
modules/juce_opengl/native/juce_OpenGL_linux.h View File

@@ -23,7 +23,7 @@
==============================================================================
*/
extern Display* display;
extern ::Display* display;
extern XContext windowHandleXContext;
//==============================================================================


Loading…
Cancel
Save