summaryrefslogtreecommitdiff
path: root/platform/x11
diff options
context:
space:
mode:
Diffstat (limited to 'platform/x11')
-rw-r--r--platform/x11/detect.py15
-rw-r--r--platform/x11/os_x11.cpp26
-rw-r--r--platform/x11/os_x11.h3
3 files changed, 39 insertions, 5 deletions
diff --git a/platform/x11/detect.py b/platform/x11/detect.py
index b8890a3a2f..9a52a7c92b 100644
--- a/platform/x11/detect.py
+++ b/platform/x11/detect.py
@@ -63,7 +63,7 @@ def get_flags():
return [
('builtin_zlib', 'no'),
("openssl", "yes"),
- ("theora","no"),
+ #("theora","no"),
]
@@ -131,8 +131,17 @@ def configure(env):
env.ParseConfig('pkg-config openssl --cflags --libs')
- env.ParseConfig('pkg-config freetype2 --cflags --libs')
- env.Append(CCFLAGS=['-DFREETYPE_ENABLED'])
+ if (env["freetype"]=="yes"):
+ env.ParseConfig('pkg-config freetype2 --cflags --libs')
+
+
+ if (env["freetype"]!="no"):
+ env.Append(CCFLAGS=['-DFREETYPE_ENABLED'])
+ if (env["freetype"]=="builtin"):
+ env.Append(CPPPATH=['#tools/freetype'])
+ env.Append(CPPPATH=['#tools/freetype/freetype/include'])
+
+
env.Append(CPPFLAGS=['-DOPENGL_ENABLED','-DGLEW_ENABLED'])
diff --git a/platform/x11/os_x11.cpp b/platform/x11/os_x11.cpp
index 51f4392eb4..fe15dd5a08 100644
--- a/platform/x11/os_x11.cpp
+++ b/platform/x11/os_x11.cpp
@@ -1181,8 +1181,22 @@ void OS_X11::process_xevents() {
XVisibilityEvent * visibility = (XVisibilityEvent *)&event;
minimized = (visibility->state == VisibilityFullyObscured);
} break;
+ case LeaveNotify: {
- case FocusIn:
+ if (main_loop && mouse_mode!=MOUSE_MODE_CAPTURED)
+ main_loop->notification(MainLoop::NOTIFICATION_WM_MOUSE_EXIT);
+ if (input)
+ input->set_mouse_in_window(false);
+
+ } break;
+ case EnterNotify: {
+
+ if (main_loop && mouse_mode!=MOUSE_MODE_CAPTURED)
+ main_loop->notification(MainLoop::NOTIFICATION_WM_MOUSE_ENTER);
+ if (input)
+ input->set_mouse_in_window(true);
+ } break;
+ case FocusIn:
minimized = false;
#ifdef NEW_WM_API
if(current_videomode.fullscreen) {
@@ -1866,6 +1880,16 @@ void OS_X11::swap_buffers() {
context_gl->swap_buffers();
}
+void OS_X11::alert(const String& p_alert,const String& p_title) {
+
+ List<String> args;
+ args.push_back("-center");
+ args.push_back("-title");
+ args.push_back(p_title);
+ args.push_back(p_alert);
+
+ execute("/usr/bin/xmessage",args,true);
+}
void OS_X11::set_icon(const Image& p_icon) {
if (!p_icon.empty()) {
diff --git a/platform/x11/os_x11.h b/platform/x11/os_x11.h
index 12f0aec611..1566062b9e 100644
--- a/platform/x11/os_x11.h
+++ b/platform/x11/os_x11.h
@@ -46,6 +46,7 @@
#include "drivers/pulseaudio/audio_driver_pulseaudio.h"
#include "servers/physics_2d/physics_2d_server_sw.h"
#include "servers/physics_2d/physics_2d_server_wrap_mt.h"
+#include "main/input_default.h"
#include <X11/keysym.h>
#include <X11/Xlib.h>
@@ -243,7 +244,7 @@ public:
virtual bool is_window_maximized() const;
virtual void move_window_to_foreground();
-
+ virtual void alert(const String& p_alert,const String& p_title="ALERT!");
void run();
OS_X11();