Skip to content

Commit 827a47d

Browse files
committed
Merge branch 'master' into be
2 parents 4200c60 + cf9ad47 commit 827a47d

File tree

5 files changed

+17
-8
lines changed

5 files changed

+17
-8
lines changed

arc-core/src/arc/scene/ui/Dialog.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -529,11 +529,11 @@ public void hide(Action action){
529529
Scene stage = getScene();
530530
if(stage != null){
531531
removeListener(focusListener);
532-
if(previousKeyboardFocus != null && previousKeyboardFocus.getScene() == null) previousKeyboardFocus = null;
532+
if(previousKeyboardFocus != null && (previousKeyboardFocus.getScene() == null || !previousKeyboardFocus.visible)) previousKeyboardFocus = null;
533533
Element actor = stage.getKeyboardFocus();
534534
if(actor == null || actor.isDescendantOf(this)) stage.setKeyboardFocus(previousKeyboardFocus);
535535

536-
if(previousScrollFocus != null && previousScrollFocus.getScene() == null) previousScrollFocus = null;
536+
if(previousScrollFocus != null && (previousScrollFocus.getScene() == null || !previousScrollFocus.visible)) previousScrollFocus = null;
537537
actor = stage.getScrollFocus();
538538
if(actor == null || actor.isDescendantOf(this)) stage.setScrollFocus(previousScrollFocus);
539539
}

backends/backend-sdl3/src/arc/backend/sdl/SdlApplication.java

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,13 +185,20 @@ private void init(){
185185
SDLVideo.SDL_GL_SetSwapInterval(1);
186186
}
187187

188+
SDLVideo.SDL_ShowWindow(window);
189+
188190
String ver = SDLVersion.SDL_GetRevision();
189191

190192
Log.info("[Core] Initialized @", ver);
191193
}
192194

193195
private void loop(){
194196

197+
//might be necessary for the window to show up on Wayland
198+
if(OS.isLinux){
199+
SDLVideo.SDL_GL_SwapWindow(window);
200+
}
201+
195202
graphics.updateSize(config.width, config.height);
196203
listen(ApplicationListener::init);
197204
try(MemoryStack stack = MemoryStack.stackPush()){
@@ -222,6 +229,7 @@ private void loop(){
222229
case SDLEvents.SDL_EVENT_DROP_FILE:
223230
Fi file = new Fi(event.drop().dataString());
224231
listen(l -> l.fileDropped(file));
232+
break;
225233

226234
default:
227235
input.handleInput(event);
@@ -240,8 +248,6 @@ private void loop(){
240248
input.postUpdate();
241249
}
242250
}
243-
244-
245251
}
246252

247253
private void listen(Cons<ApplicationListener> cons){

backends/backend-sdl3/src/arc/backend/sdl/SdlGraphics.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,11 @@ public class SdlGraphics extends Graphics{
6161
Core.gl = Core.gl20 = gl20 = Core.gl30 = gl30 = new SdlGL30();
6262
}
6363

64+
//disable GL_FRAMEBUFFER_SRGB https://github.com/libsdl-org/SDL/issues/14898
65+
if(caps.GL_ARB_framebuffer_sRGB || caps.GL_EXT_framebuffer_sRGB || glVersion.atLeast(3, 0)){
66+
Core.gl.glDisable(0x8DB9);
67+
}
68+
6469
clear(app.config.initialBackgroundColor);
6570
SDLVideo.SDL_GL_SwapWindow(app.window);
6671
}

backends/backend-sdl3/src/arc/backend/sdl/SdlInput.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,7 @@ void handleInput(SDL_Event event){
7979
}
8080

8181
}else if(type == SDLEvents.SDL_EVENT_MOUSE_WHEEL){
82-
int sx = (int)event.wheel().x();
83-
int sy = (int)event.wheel().y();
84-
queue.scrolled(-sx, -sy);
82+
queue.scrolled(-event.wheel().x(), -event.wheel().y());
8583
}else if(type == SDLEvents.SDL_EVENT_TEXT_INPUT){
8684
String text = event.text().textString();
8785
if(text != null){

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ versions.robovm = "2.3.24"
1111
versions.junit = "4.11"
1212
//TODO: upgrade to 3.1.1 and finally get rid of the disease that is ant
1313
versions.jnigen = "2.5.1"
14-
versions.lwjgl = "3.4.0"
14+
versions.lwjgl = "3.4.1"
1515

1616
libraries.robovm = [
1717
"com.mobidevelop.robovm:robovm-rt:${versions.robovm}",

0 commit comments

Comments
 (0)