This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Java GUI applications and window focus

Tags: None
(comma "," separated)
Voltago
Registered Member
Posts
11
Karma
0
Ok, this is a weird one... in plasma-next I've noticed the following:

When using a java GUI application (e. g. netbeans), and switching to another window via TaskManager, in ca. 50% of the cases the window focus will not be transferred to this other window, so that input events still go to the java application. I'm using netbeans a fair bit, so I can state with confidence that this does not happen in KDE 4.13.x.

Could you

a) point me to the subsystem that's responsible for the transfer of the input focus so I can file a bug correcly? Is it kwindowsystem?
b) try to quickly verify this observation if you happen to have some java application around?
c) yell 'here' if you've seen the same or a similar problem?

Thanks,

Andreas
mgraesslin
KDE Developer
Posts
572
Karma
7
OS
what about switching windows through the window manager? E.g. Alt+Tab, present windows, click on other windows?
Voltago
Registered Member
Posts
11
Karma
0
Hi,

I've played with Alt+Tab and Expose for some time, and they seem to work correctly. As for just clicking on the window, it is possible to bring the window to the foreground without giving it input focus (with a console, the cursor is still the emtpy rectangle), but only if you click at it very quickly, and again only if a java gui hold the focus. Between two kde windows, everything's fine.
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
What level is your focus stealing prevention set at? This can be found in System Settings.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
Voltago
Registered Member
Posts
11
Karma
0
It's set to 'Low'. I tried to turn it off, but that didn't change anything.
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
Are there any Java applications other than Netbeans which you can reproduce the issue in? Also, which version of Java are they running under?


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
Voltago
Registered Member
Posts
11
Karma
0
I've tried both oracle javase 7 and 8 (jdk), used a small self-compiled swing application and downloaded jabref-2.10. Same results as before. So nobody but me is seeing this behavior?
mgraesslin
KDE Developer
Posts
572
Karma
7
OS
Voltago wrote:So nobody but me is seeing this behavior?


Java is not that commonly used in GUI applications any more. I personally keep away from Java for security reasons and would have to install it first.
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
I'm afraid I don't have Java installed either. Perhaps another user can attempt to reproduce this?


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
luebking
Karma
0
No java, no taskbar here.

However,
- what is the other window? Java as well?
- Which taskbar implementation in particular?
- Is the panel autohiding? (Is the taskbar in a panel at all?)
- Please dump the outputs of "xwininfo" and "xprop" on the window (cursor turns into a '+', then just click the window) here (use "code" tags)
wolfi323
Registered Member
Posts
1129
Karma
11
OS
bcooksley wrote:I'm afraid I don't have Java installed either. Perhaps another user can attempt to reproduce this?

I do have Java installed. (OpenJDK 1.7.0)

But I cannot reproduce this behavior. Everything is working like expected here (4.13.x) with the standard task bar in the panel (no matter whether it is hiding or not) or even on the desktop.
luebking
Karma
0
@Voltago, Wolfie:
do you use the same focus policy ("click to focus", "focus follows mouse", etc.)?
wolfi323
Registered Member
Posts
1129
Karma
11
OS
luebking wrote:@Voltago, Wolfie:
do you use the same focus policy ("click to focus", "focus follows mouse", etc.)?

I'm using "Click to focus".

But I noticed now that the OP talked about Plasma Next. I misread that.
I only tried in 4.13, I do not have Plasma 5 installed at the moment...

Sorry.
wolfi323
Registered Member
Posts
1129
Karma
11
OS
I tried again on Plasma5 now, and indeed I could easily reproduce the issue.
I have pretty much the default settings, i.e. "Click to Focus", no panel auto-hiding, the standard task manager in the panel.

It only seems to happen when Java windows are involved, and I couldn't reproduce it with Alt+TAB, exactly as the OP described already.

Strange enough, I quit the Java application while writing this, and now after starting it again I cannot reproduce it any more...
Hm.

PS: Right after clicking "Submit", I was able to reproduce this again.
Voltago
Registered Member
Posts
11
Karma
0
Hi luebking,

the other window can be konsole, or thunderbird compose, or libreoffice writer, or kate, it does not seem to matter. The taskbar implementation is the standard 'Task Manager' Plasmoid. Its containing panel is not auto-hiding. I'm also using the 'Click to Focus' policy.

xwininfo output for the java window (netbeans in this case):
Code: Select all
xwininfo: Please select the window about which you
          would like information by clicking the
          mouse in that window.

xwininfo: Window id: 0x2200031 "espressoLabAutomation - NetBeans IDE 8.0"

  Absolute upper-left X:  2
  Absolute upper-left Y:  23
  Relative upper-left X:  0
  Relative upper-left Y:  0
  Width: 1434
  Height: 843
  Depth: 24
  Visual: 0x20
  Visual Class: TrueColor
  Border width: 0
  Class: InputOutput
  Colormap: 0x22 (installed)
  Bit Gravity State: NorthWestGravity
  Window Gravity State: NorthWestGravity
  Backing Store State: NotUseful
  Save Under State: no
  Map State: IsViewable
  Override Redirect State: no
  Corners:  +2+23  -4+23  -4-34  +2-34
  -geometry 1434x843+0+0


xprop output:
Code: Select all
_NET_WM_ICON_GEOMETRY(CARDINAL) = 914, 874, 295, 26
_NET_WM_ALLOWED_ACTIONS(ATOM) = _NET_WM_ACTION_MOVE, _NET_WM_ACTION_RESIZE, _NET_WM_ACTION_MINIMIZE, _NET_WM_ACTION_SHADE, _NET_WM_ACTION_MAXIMIZE_VERT, _NET_WM_ACTION_MAXIMIZE_HORZ, _NET_WM_ACTION_FULLSCREEN, _NET_WM_ACTION_CHANGE_DESKTOP, _NET_WM_ACTION_CLOSE
_KDE_NET_WM_FRAME_STRUT(CARDINAL) = 2, 2, 23, 4
_NET_FRAME_EXTENTS(CARDINAL) = 2, 2, 23, 4
_NET_WM_DESKTOP(CARDINAL) = 0
_KDE_NET_WM_ACTIVITIES(STRING) = "f330ef8c-c8c5-407c-82ce-a63d8e90ca86"
WM_STATE(WM_STATE):
                window state: Normal
                icon window: 0x0
_NET_WM_WINDOW_TYPE(ATOM) = _NET_WM_WINDOW_TYPE_NORMAL
_MOTIF_WM_HINTS(_MOTIF_WM_HINTS) = 0x3, 0x1, 0x1, 0x0, 0x0
_MOTIF_DRAG_RECEIVER_INFO(_MOTIF_DRAG_RECEIVER_INFO) = 0x6c, 0x0, 0x5, 0x0, 0x31, 0x0, 0x20, 0x2, 0x0, 0x0, 0x0, 0x0, 0x10, 0x0, 0x0, 0x0
XdndAware(ATOM) = BITMAP
_NET_WM_STATE(ATOM) = _NET_WM_STATE_MAXIMIZED_VERT
WM_HINTS(WM_HINTS):
                Client accepts input or input focus: False
                Initial state is Normal State.
_NET_WM_ICON(CARDINAL) =        Icon (16 x 16):
               ▒▓▒░     
            ░▓▓▒░░▒▓▒░ 
          ░▓▒░      ▒▓▓░
         ░▒░          ░▒
         ▓░░░          ▓
         ▓▒░░░░       ░▓
         ▒▒░░░░░      ░▓
         ▒▒░░░░░      ░▓
         ▒▒░░░░░     ░░▓
         ▒▒░░░░░     ░░▓
         ▒▒░░░░░    ░░░▓
         ▒▒░░░░░   ░░░░▓
          ▓▒░░░░   ░░░▓░
           ▒▓▒░░   ░▓▓░
             ▒▓▒░░▓▓░   
               ▒▓▒░     

        Icon (32 x 32):
                     ░▒▒▒░             
                  ░▒▓▓▓▓▓▓▓▒░           
                ▒▓▓▓▓▓▒░▒▒▓▓▓▓▒         
             ░▒▓▓▓▓▒░     ░▒▓▓▓▓▒░     
           ▒▓▓▓▓▒░           ░▒▓▓▓▓▒   
         ▒▓▓▓▓▒░               ░▒▓▓▓▓▒ 
         ▓▓▓░                     ░▓▓▓ 
        ░▓▓░░░                   ░░ ▓▓▒
        ▒▓▒░ ░░░               ░░   ░▓▒
        ▒▓▒░░░  ░░░         ░░      ░▓▓
        ▒▓▒░░░░░  ░░░     ░░        ▒▓▓
        ▒▓▒░░░░░░░░  ░░░░          ░▒▓▒
        ▒▓▒░░░░░░░░░░             ░░▒▓▒
        ▒▓▓░░░░░░░░░░░            ░░▒▓▒
        ▒▓▒░░░░░░░░░░░░          ░░░▒▓▒
        ▒▓▒░░░░░░░░░░░░          ░░░▒▓▒
        ▒▓▓░░░░░░░░░░░░         ░░░░▒▓▒
        ░▓▓░░░░░░░░░░░░         ░░░░▒▓▒
        ░▓▓▒░░░░░░░░░░░        ░░░░░▒▓░
        ░▓▓▒░░░░░░░░░░░       ░░░░░░▒▓░
        ░▓▓▒░░░░░░░░░░░       ░░░░░░▓▓░
        ░▓▓▒░░░░░░░░░░░      ░░░░░░░▒▓░
        ░▓▓▒░░░░░░░░░░░      ░░░░░░░▓▓░
         ▓▓▒░░░░░░░░░░░     ░░░░░░░░▓▓ 
         ▒▓▓▒░░░░░░░░░░     ░░░░░░▒▓▓▒ 
          ▒▓▓▓▒░░░░░░░░    ░░░░░▒▓▓▓▒   
           ░▓▓▓▓▒░░░░░░   ░░░░▒▓▓▓▓▒   
             ░▓▓▓▓▒░░░░   ░░▒▓▓▓▓▒     
               ▒▓▓▓▓▒░░  ░▒▓▓▓▓▒       
                 ▒▓▓▓▓▒░▒▓▓▓▓▒         
                   ▒▓▓▓▓▓▓▓▒           
                     ░▒▒▒░             

        Icon (48 x 48):
                             ░▒▒▒░░                     
                          ░▓▓▓▓▓▓▓▓▓░                   
                       ░▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░               
                     ▒▓▓▓▓▓▓▓▒░░░▒▓▓▓▓▓▓▓▒             
                  ░▓▓▓▓▓▓▓▒▒       ░▒▓▓▓▓▓▓▓░           
               ░▒▓▓▓▓▓▓▓▒░           ░▒▓▓▓▓▓▓▓▒░       
             ░▓▓▓▓▓▓▓▒░                 ░▒▓▓▓▓▓▓▓░     
           ░▓▓▓▓▓▓▓▒░                     ░▒▓▓▓▓▓▓▓░   
          ▒▓▓▓▓▓▒░                           ░▒▓▓▓▓▓▒   
         ░▓▓▓▓▒                                 ▒▓▓▓▓▒ 
         ▓▓▓▓░░                                 ░░▒▓▓▓ 
         ▓▓▓▒░░░░░                           ░░░░ ░▓▓▓░
        ░▓▓▓░░  ░░░░                       ░░░     ▒▓▓░
        ░▓▓▓░░░░   ░░░░                  ░░░       ▒▓▓▒
        ░▓▓▓▒░░░░░   ░░░░             ░░░         ░▒▓▓▒
        ░▓▓▓▒░░░░░░░░   ░░░         ░░░           ░▒▓▓▒
        ░▓▓▓▒░░░░░░░░░░   ░░░░   ░░░             ░░▒▓▓▒
        ░▓▓▓▒░░░░░░░░░░░░    ░░░░░               ░░▒▓▓░
        ░▓▓▓▒░░░░░░░░░░░░░░░                    ░░░▒▓▓░
        ░▓▓▓▒░░░░░░░░░░░░░░░░                  ░░░░▓▓▓░
        ░▓▓▓▒░░░░░░░░░░░░░░░░░                 ░░░░▓▓▓░
         ▓▓▓▒░░░░░░░░░░░░░░░░░░               ░░░░░▓▓▓░
         ▓▓▓▒░░░░░░░░░░░░░░░░░░               ░░░░░▓▓▓░
         ▓▓▓▒░░░░░░░░░░░░░░░░░░              ░░░░░░▓▓▓░
         ▓▓▓▒░░░░░░░░░░░░░░░░░░              ░░░░░░▓▓▓░
         ▓▓▓▒░░░░░░░░░░░░░░░░░              ░░░░░░░▓▓▓ 
         ▓▓▓▒▒░░░░░░░░░░░░░░░░              ░░░░░░░▓▓▓ 
         ▓▓▓▒▒░░░░░░░░░░░░░░░░             ░░░░░░░░▓▓▓ 
         ▓▓▓▒▒░░░░░░░░░░░░░░░░             ░░░░░░░░▓▓▓ 
         ▓▓▓▒▒░░░░░░░░░░░░░░░░            ░░░░░░░░░▓▓▓ 
         ▓▓▓▒▒░░░░░░░░░░░░░░░░            ░░░░░░░░░▓▓▓ 
         ▓▓▓▒▒░░░░░░░░░░░░░░░░           ░░░░░░░░░░▓▓▓ 
         ▓▓▓▒▒░░░░░░░░░░░░░░░░          ░░░░░░░░░░░▓▓▓ 
         ▓▓▓▒▒░░░░░░░░░░░░░░░░          ░░░░░░░░░░▒▓▓▓ 
         ▒▓▓▒░▒░░░░░░░░░░░░░░░         ░░░░░░░░░░░▒▓▓▒ 
         ░▓▓▓░░░░░░░░░░░░░░░░░         ░░░░░░░░░░░▓▓▓░ 
          ▓▓▓▓▒░░░░░░░░░░░░░░░        ░░░░░░░░░░░▓▓▓▓   
          ░▓▓▓▓▓▒░░░░░░░░░░░░░        ░░░░░░░░░▒▓▓▓▓░   
           ░▓▓▓▓▓▓▒░░░░░░░░░░░       ░░░░░░░░▒▓▓▓▓▓░   
             ▒▓▓▓▓▓▓▒░░░░░░░░░      ░░░░░░░▒▓▓▓▓▓▒     
               ▒▓▓▓▓▓▓▒░░░░░░░     ░░░░░░▒▓▓▓▓▓▓       
                 ▒▓▓▓▓▓▓▒░░░░░     ░░░░▒▓▓▓▓▓▓░         
                   ▒▓▓▓▓▓▓▒░░░    ░░░▒▓▓▓▓▓▒           
                     ▒▓▓▓▓▓▓▒░░   ░▒▓▓▓▓▓▒             
                       ▒▓▓▓▓▓▓▒▒▒▒▓▓▓▓▓▒               
                         ▒▓▓▓▓▓▓▓▓▓▓▓▓                 
                           ▒▓▓▓▓▓▓▓▒                   
                             ░▒▒▒░                     


_NET_WM_PID(CARDINAL) = 8462
WM_CLIENT_MACHINE(STRING) = "heraklit"
WM_PROTOCOLS(ATOM): protocols  WM_DELETE_WINDOW, WM_TAKE_FOCUS
WM_CLASS(STRING) = "sun-awt-X11-XFramePeer", "NetBeans IDE 8.0"
WM_CLIENT_LEADER(WINDOW): window id # 0x2200004
_NET_WM_ICON_NAME(UTF8_STRING) = "espressoLabAutomation - NetBeans IDE 8.0"
_KDE_NET_WM_USER_CREATION_TIME(CARDINAL) = 4625702
WM_ICON_NAME(STRING) = "espressoLabAutomation - NetBeans IDE 8.0"
_NET_WM_NAME(UTF8_STRING) = "espressoLabAutomation - NetBeans IDE 8.0"
WM_NAME(STRING) = "espressoLabAutomation - NetBeans IDE 8.0"
WM_NORMAL_HINTS(WM_SIZE_HINTS):
                user specified location: -2, -3
                program specified location: -2, -3
                program specified size: 1434 by 847
                window gravity: NorthWest


Bookmarks



Who is online

Registered users: Bing [Bot], blue_bullet, Google [Bot], rockscient, Yahoo [Bot]