Browse Source

Updated use of deprecated linux keyboard function. Removed some unnecessary GL headers.

tags/2021-05-28
jules 13 years ago
parent
commit
3ef8be7a42
3 changed files with 3 additions and 53 deletions
  1. +1
    -0
      modules/juce_gui_basics/juce_gui_basics.cpp
  2. +2
    -2
      modules/juce_gui_basics/native/juce_linux_Windowing.cpp
  3. +0
    -51
      modules/juce_opengl/juce_opengl.cpp

+ 1
- 0
modules/juce_gui_basics/juce_gui_basics.cpp View File

@@ -96,6 +96,7 @@
#include <X11/Xutil.h>
#include <X11/Xmd.h>
#include <X11/keysym.h>
#include <X11/XKBlib.h>
#include <X11/cursorfont.h>
#include <unistd.h>


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

@@ -1284,7 +1284,7 @@ public:
keyCode = (int) unicodeChar;
if (keyCode < 0x20)
keyCode = XKeycodeToKeysym (display, keyEvent->keycode, currentModifiers.isShiftDown() ? 1 : 0);
keyCode = XkbKeycodeToKeysym (display, keyEvent->keycode, currentModifiers.isShiftDown() ? 1 : 0, 0);
keyDownChange = (sym != NoSymbol) && ! updateKeyModifiersFromSym (sym, true);
}
@@ -1387,7 +1387,7 @@ public:
{
ScopedXLock xlock;
sym = XKeycodeToKeysym (display, keyEvent->keycode, 0);
sym = XkbKeycodeToKeysym (display, keyEvent->keycode, 0, 0);
}
const ModifierKeys oldMods (currentModifiers);


+ 0
- 51
modules/juce_opengl/juce_opengl.cpp View File

@@ -46,61 +46,13 @@
//==============================================================================
#elif JUCE_WINDOWS
#include <windowsx.h>
#include <vfw.h>
#include <commdlg.h>
#if JUCE_WEB_BROWSER
#include <Exdisp.h>
#include <exdispid.h>
#endif
#if JUCE_MSVC && ! JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES
#pragma comment(lib, "vfw32.lib")
#pragma comment(lib, "imm32.lib")
#pragma comment(lib, "OpenGL32.Lib")
#endif
#if JUCE_QUICKTIME && JUCE_MSVC && ! JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES
#pragma comment (lib, "QTMLClient.lib")
#endif
#if JUCE_DIRECT2D && JUCE_MSVC && ! JUCE_DONT_AUTOLINK_TO_WIN32_LIBRARIES
#pragma comment (lib, "Dwrite.lib")
#pragma comment (lib, "D2d1.lib")
#endif
//==============================================================================
#elif JUCE_LINUX
#include <X11/Xlib.h>
#include <X11/Xatom.h>
#include <X11/Xresource.h>
#include <X11/Xutil.h>
#include <X11/Xmd.h>
#include <X11/keysym.h>
#include <X11/cursorfont.h>
#if JUCE_USE_XINERAMA
/* If you're trying to use Xinerama, you'll need to install the "libxinerama-dev" package.. */
#include <X11/extensions/Xinerama.h>
#endif
#if JUCE_USE_XSHM
#include <X11/extensions/XShm.h>
#include <sys/shm.h>
#include <sys/ipc.h>
#endif
#if JUCE_USE_XRENDER
// If you're missing these headers, try installing the libxrender-dev and libxcomposite-dev
#include <X11/extensions/Xrender.h>
#include <X11/extensions/Xcomposite.h>
#endif
#if JUCE_USE_XCURSOR
// If you're missing this header, try installing the libxcursor-dev package
#include <X11/Xcursor/Xcursor.h>
#endif
/* Got an include error here?
If you want to install OpenGL support, the packages to get are "mesa-common-dev"
@@ -108,9 +60,6 @@
*/
#include <GL/glx.h>
#undef SIZEOF
#undef KeyPress
//==============================================================================
#elif JUCE_MAC
#include <OpenGL/CGLCurrent.h> // These are both just needed with the 10.5 SDK


Loading…
Cancel
Save