Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Linux] Application window launches as "always on top" with some OSes #3328

Open
itlancer opened this issue Jul 1, 2024 · 2 comments
Open
Labels

Comments

@itlancer
Copy link

itlancer commented Jul 1, 2024

Problem Description

Application window launches as "always on top" with some Linux OSes.
It breaks UX and cause instability in window manipulations.
Only minimizations or some similar manipulations with window makes behavior normal.

Tested with multiple AIR versions, even with latest AIR 51.0.1.3 with multiple different Linux x86_64 devices with different applications. With VM and real devices.
With Ubuntu 22.04 x86_64 it always reproducible.

Related issues:
#3317
#3239
#3203
#2549
#2548
#2534
#2241
#1840

Steps to Reproduce

  1. Launch any application with GUI window using Ubuntu 22.04 x86_64. Calculator, Terminal...
    Better if it will be maximized on whole screen.
  2. Launch application with code below with Ubuntu 22.04 x86_64. AIR application window should overlay some application window launched before.
  3. Click to application window below (under AIR application window) to switch focus to other window.

Application example with sources attached.
linux_always_on_top_bug.zip

package {
	import flash.display.Sprite;
	import flash.events.Event;
	import flash.utils.setTimeout;
	
	public class LinuxAlwaysOnTopBug extends Sprite {
		
		public function LinuxAlwaysOnTopBug() {
			addEventListener(Event.ADDED_TO_STAGE, addedToStage);
		}
		
		private function addedToStage(e:Event):void {
			removeEventListener(Event.ADDED_TO_STAGE, addedToStage);
			
			//Uncomment lines below for workaround:
			//stage.nativeWindow.alwaysInFront = true;
			//setTimeout(function():void {
			//	stage.nativeWindow.alwaysInFront = false;
			//}, 100);
		}
		
	}
}

Actual Result:
AIR application window still in front of other windows.
Only after manual minimization and restoring it start to work normally.

Expected Result:
AIR application window goes below other window.
No fake "always in front" behavior.

Known Workarounds

Change NativeWindow::alwaysInFront twice with short timeout as shown in code above.

@itlancer itlancer added the Bug label Jul 1, 2024
@itlancer
Copy link
Author

itlancer commented Jul 8, 2024

Issue still exists with latest AIR 51.0.1.4.

@itlancer
Copy link
Author

itlancer commented Aug 6, 2024

Issue still exists with latest AIR 51.1.1.2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant