You can subscribe to this list here.
| 2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(134) |
Sep
(52) |
Oct
(13) |
Nov
(342) |
Dec
(163) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2003 |
Jan
(44) |
Feb
(62) |
Mar
(158) |
Apr
(38) |
May
(70) |
Jun
(58) |
Jul
(104) |
Aug
(207) |
Sep
(83) |
Oct
(122) |
Nov
(23) |
Dec
(49) |
| 2004 |
Jan
(119) |
Feb
(132) |
Mar
(192) |
Apr
(140) |
May
(77) |
Jun
(74) |
Jul
(201) |
Aug
(63) |
Sep
(102) |
Oct
(70) |
Nov
(173) |
Dec
(78) |
| 2005 |
Jan
(174) |
Feb
(197) |
Mar
(105) |
Apr
(59) |
May
(77) |
Jun
(43) |
Jul
(21) |
Aug
(18) |
Sep
(47) |
Oct
(37) |
Nov
(74) |
Dec
(50) |
| 2006 |
Jan
(44) |
Feb
(19) |
Mar
(32) |
Apr
(24) |
May
(31) |
Jun
(55) |
Jul
(138) |
Aug
(28) |
Sep
(12) |
Oct
(41) |
Nov
(58) |
Dec
(24) |
| 2007 |
Jan
(28) |
Feb
(14) |
Mar
(10) |
Apr
(68) |
May
(30) |
Jun
(26) |
Jul
(18) |
Aug
(63) |
Sep
(19) |
Oct
(29) |
Nov
(20) |
Dec
(10) |
| 2008 |
Jan
(38) |
Feb
(7) |
Mar
(37) |
Apr
(120) |
May
(41) |
Jun
(36) |
Jul
(39) |
Aug
(24) |
Sep
(28) |
Oct
(30) |
Nov
(36) |
Dec
(75) |
| 2009 |
Jan
(46) |
Feb
(22) |
Mar
(50) |
Apr
(70) |
May
(134) |
Jun
(105) |
Jul
(75) |
Aug
(34) |
Sep
(38) |
Oct
(34) |
Nov
(19) |
Dec
(20) |
| 2010 |
Jan
(11) |
Feb
(20) |
Mar
(65) |
Apr
(83) |
May
(104) |
Jun
(73) |
Jul
(78) |
Aug
(57) |
Sep
(43) |
Oct
(35) |
Nov
(9) |
Dec
(4) |
| 2011 |
Jan
(21) |
Feb
(11) |
Mar
(18) |
Apr
(10) |
May
(18) |
Jun
(15) |
Jul
(48) |
Aug
(25) |
Sep
(17) |
Oct
(45) |
Nov
(15) |
Dec
(12) |
| 2012 |
Jan
(21) |
Feb
(9) |
Mar
(12) |
Apr
(9) |
May
(9) |
Jun
(5) |
Jul
(1) |
Aug
(10) |
Sep
(12) |
Oct
(1) |
Nov
(28) |
Dec
(5) |
| 2013 |
Jan
(4) |
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2014 |
Jan
|
Feb
(1) |
Mar
(1) |
Apr
|
May
(2) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
| 2015 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
(2) |
Nov
|
Dec
|
| 2016 |
Jan
(2) |
Feb
(1) |
Mar
(1) |
Apr
(1) |
May
(2) |
Jun
|
Jul
(1) |
Aug
(2) |
Sep
|
Oct
|
Nov
(1) |
Dec
|
| 2017 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
|
|
|
|
|
|
|
1
|
|
2
(1) |
3
(2) |
4
(1) |
5
(1) |
6
(3) |
7
|
8
(2) |
|
9
|
10
(1) |
11
(6) |
12
(8) |
13
(2) |
14
(2) |
15
(6) |
|
16
|
17
(1) |
18
(1) |
19
|
20
(2) |
21
(1) |
22
|
|
23
|
24
|
25
(3) |
26
(1) |
27
|
28
|
29
|
|
30
(1) |
31
|
|
|
|
|
|
|
From: <ka...@us...> - 2011-10-30 14:44:59
|
Revision: 3689
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3689&view=rev
Author: kappa1
Date: 2011-10-30 14:44:52 +0000 (Sun, 30 Oct 2011)
Log Message:
-----------
Fix keyboard handling when running Display.setParent() as an application on Linux. Thus allowing WM and system hot-keys to function again when the LWJGL app has focus.
Modified Paths:
--------------
trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxDisplay.java
trunk/LWJGL/src/native/linux/opengl/org_lwjgl_opengl_Display.c
trunk/LWJGL/src/native/linux/opengles/org_lwjgl_opengl_Display.c
Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxDisplay.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxDisplay.java 2011-10-26 20:24:22 UTC (rev 3688)
+++ trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxDisplay.java 2011-10-30 14:44:52 UTC (rev 3689)
@@ -152,6 +152,7 @@
private static boolean xembedded;
private long parent_proxy_focus_window;
private boolean parent_focused;
+ private boolean parent_focus_changed;
private long last_window_focus = 0;
private LinuxKeyboard keyboard;
@@ -161,11 +162,13 @@
public void focusGained(FocusEvent e) {
synchronized (GlobalLock.lock) {
parent_focused = true;
+ parent_focus_changed = true;
}
}
public void focusLost(FocusEvent e) {
synchronized (GlobalLock.lock) {
parent_focused = false;
+ parent_focus_changed = true;
}
}
};
@@ -489,9 +492,8 @@
if (parent != null) {
parent.addFocusListener(focus_listener);
- if (parent.isFocusOwner()) {
- parent_focused = true;
- }
+ parent_focused = parent.isFocusOwner();
+ parent_focus_changed = true;
}
} finally {
peer_info.unlock();
@@ -549,6 +551,9 @@
public void destroyWindow() {
lockAWT();
try {
+ if (parent != null) {
+ parent.removeFocusListener(focus_listener);
+ }
try {
setNativeCursor(null);
} catch (LWJGLException e) {
@@ -971,20 +976,24 @@
}
}
else {
- if (parent_focused != keyboard_grabbed) {
- if (parent_focused) {
- grabKeyboard();
- input_released = false;
- focused = true;
- }
- else {
- ungrabKeyboard();
- input_released = true;
- focused = false;
- }
+ if (parent_focus_changed && parent_focused) {
+ setInputFocusUnsafe(getWindow());
+ parent_focus_changed = false;
}
}
}
+
+ private void setInputFocusUnsafe(long window) {
+ try {
+ nSetInputFocus(getDisplay(), window, CurrentTime);
+ nSync(getDisplay(), false);
+ } catch (LWJGLException e) {
+ // Since we don't have any event timings for XSetInputFocus, a race condition might give a BadMatch, which we'll catch and ignore
+ LWJGLUtil.log("Got exception while trying to focus: " + e);
+ }
+ }
+
+ private static native void nSync(long display, boolean throw_away_events) throws LWJGLException;
/**
* This method will check if the parent window is active when running
Modified: trunk/LWJGL/src/native/linux/opengl/org_lwjgl_opengl_Display.c
===================================================================
--- trunk/LWJGL/src/native/linux/opengl/org_lwjgl_opengl_Display.c 2011-10-26 20:24:22 UTC (rev 3688)
+++ trunk/LWJGL/src/native/linux/opengl/org_lwjgl_opengl_Display.c 2011-10-30 14:44:52 UTC (rev 3689)
@@ -138,6 +138,11 @@
return (intptr_t)XSetErrorHandler(handler);
}
+JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nSync(JNIEnv *env, jclass unused, jlong display_ptr, jboolean throw_away_events) {
+ Display *disp = (Display *)(intptr_t)display_ptr;
+ XSync(disp, throw_away_events ? True : False);
+}
+
JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxDisplay_sync(JNIEnv *env, jclass unused, jlong display_ptr, jboolean throw_away_events) {
Display *disp = (Display *)(intptr_t)display_ptr;
XSync(disp, throw_away_events ? True : False);
Modified: trunk/LWJGL/src/native/linux/opengles/org_lwjgl_opengl_Display.c
===================================================================
--- trunk/LWJGL/src/native/linux/opengles/org_lwjgl_opengl_Display.c 2011-10-26 20:24:22 UTC (rev 3688)
+++ trunk/LWJGL/src/native/linux/opengles/org_lwjgl_opengl_Display.c 2011-10-30 14:44:52 UTC (rev 3689)
@@ -135,6 +135,11 @@
return (intptr_t)XSetErrorHandler(handler);
}
+JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nSync(JNIEnv *env, jclass unused, jlong display_ptr, jboolean throw_away_events) {
+ Display *disp = (Display *)(intptr_t)display_ptr;
+ XSync(disp, throw_away_events ? True : False);
+}
+
JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxDisplay_sync(JNIEnv *env, jclass unused, jlong display_ptr, jboolean throw_away_events) {
Display *disp = (Display *)(intptr_t)display_ptr;
XSync(disp, throw_away_events ? True : False);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|