KDE Window Focus Problem

In KDE, when I'm focused on a window in foreground and I click on the contents of a window in the background the focus of the window changes, but the window that was in the foreground does not go behind the window that I just clicked on.
http://img404.imageshack.us/img404/2745 … cusli7.png
In that picture, I was focused on the Pidgin window and I clicked on this text box of Firefox and the Pidgin window in the foreground.
The only way to place that window in the background is to click the title bar on top of Firefox, then it behaves normally.  By the way, I'm running KDE3.
Any help would be appreciated, thanks.
Last edited by darkNiGHTS (2008-03-26 02:19:46)

It's been quite some time since I've used KDE, but isn't there some kind of "raise on focus" setting that would raise newly focused windows? I'm certain this setting exists for focus-follows-mouse but I don't remember if it applies to click-to-focus.
j

Similar Messages

  • Significant Computer Window Focus Problem With Verizon Access Manager 7.7.1.0 (2707e)

    With the newly released Verizon Access Manager 7.7.1.0 (2707e) there is a significant computer focus problem with it.
    What I mean by this is that if I am using ANY application on my computer with the Verizon Access Manager minimized to the Windows System Tray, something will go on with the Verizon Access Manager and it steals the window focus - I am unable to work in the other application unless I click on the application to use it again.  
    An example of this would be my typing to post a message in this forum.  Something occurs in the Verizon Access Manager and my typing is rendered useless unless I click with my mouse on the browser window to be able to use it again.
    I'm highly suspecting whenever networks are coming and going in the Access Manager is when the problem occurs.
     This problem did not exist in the previous version of the Access Manager I was using.
    This is extremely annoying - please issue a fix for this ASAP!

    I have found by not minimzing the Verizon Access Manager 7.7.1.0 (2707e) the focus problem does not occur - it appears to be a problem when the app is minimzed to the system tray.

  • ACR to Photoshop CS5 window focus problem.

    Running Photoshop CS5 on Win7, both 64 bit. No problems for months, then recently this minor "annoyance" appeared.
    I "host" ACR via Bridge, with the windows for all three apps maximized. I double-click a raw file in Bridge and ACR opens. I make my ACR adjustments, or not, and click "Open Image" to pass to Photoshop.
    The images passes into Photoshop OK, but the Photoshop window does not receive "focus". Instead, the ACR window closes, leaving the underlying Bridge window displayed. But then no window has focus.
    When I click once on the Photoshop tab, I get a screen flicker, like a window is being minimized, but the Bridge window remains displayed. I click again on the Photoshop tab and it comes up, full screen with focus.
    If I take the ACR window out of "maximized" mode, the problem does not occur. Raw images pass from Bridge through ACR to Photoshop with proper window focus. Opening tif, psd, or jpeg images via Bridge is no problem. Only when raw images pass through a maximized ACR window does Photoshop fail to receive focus.
    A few days ago I used the Windows 7 "snap" feature to place the Photoshop window and ACR window side-by-side. This is done by dragging a window off-screen until it turns blue and then releasing. I believe this action caused the problem I'm having now. I've unsnapped, resnapped, and unsnapped the Photoshop and ACR windows several times, hoping to clear the problem, but it remains.
    Keeping the ACR window out of maximized mode is an easy work around, but the mystery remains and I hate mysteries.

    I know how you feel, I've had a few problems like this with CS5. I can only think of two suggestions:
    1. Disable Windows 7's fancy desktop (Aero peek, or whatever it's called) to see if that helps.
    2. Make sure you're sorting by filename in Bridge. I have noticed that sorting by metadata causes Bridge to sometimes steal focus when it's not wanted. I love Bridge, but christ it needs a good sorting out.

  • X11 Window Focus Problem Driving Me Crazy

    Hello,
    For no reason that I can figure, I'm having difficulty in OS X with the window focus. In the gimp, or inkscape or any other X11 program, when I click on a button, after about a second, the focus of the window is temporally lost. I've uploaded a video to show the problem more exactly:
    http://www.screencast.com/users/grey1618/folders/Jing/media/d826455a-9657-4409-b 085-a8a1b3c5ca19
    If you watch the close, minimize and plus button on the top of each window after I click each tool you'll see what I mean.
    Any help would be really, really appreciated.
    Thank you,
    -Grey

    Best you post to the Unix forum under OS X Technologies where the Unix, Terminal, and X11 mavens congregate.

  • IPhone - Safari parent window focus problem

    Hi All,
    I am having a peculiar problem with a website i am developing. The problem *only* happens on the iPhone(safari).
    My setup is as follows.
    1) I have a CLIENT page - shows an initial page, and has a login button.
    2) User clicks on the LOGIN button, and is shown a LOGIN popup/new-window  (this is created by posting a form using jquery 'submit' function with target='_blank')
    ====
    CLIENT.html
    var formData = '<form style="display: none; margin: 0; padding: 0; border-width: 0; overflow: hidden;" id="MyFormId" action="https://MYSERVER.COM/v2/widgets" method="POST" target="_blank"><input type="hidden" name="action" value="connect"/><input type="hidden" name="referringURL" value="http://MYCLIENT.com/ClientPage.html"/><input type="hidden" name="cartOwnerId" value="A2R6QUFKT17A1O"/></form>';
    CBA.jQuery("#"+this.getLocation()).append(formData);
    jQuery("#"+formIdName).submit();                                                                                                                                
    ====
    3) User enters credentials on LOGIN window, and submits. A call is made to the SERVER to authenticate. On SUCCESSFUL authentication, we want to
       * CLOSE the LOGIN window
       * REDIRECT Client page to new URL
    4) Everything works as planned, EXCEPT that the Client window (that created the LOGIN popup/new window), does not return to full-screen (after the LOGIN window closed).
    If i try to put a window.opener.focus() in the LOGIN page javascript, i get focus on the CLIENT page, but the LOGIN page does not close(even if i put window.close before the window.opener.focus())
    ====
    LOGIN html
    jQuery(document).ready(function() {
            var messageToOpener = true;
            var fullMessage = PURCHASE_CONTRACT_ID_PREFIX + "${viewer.purchaseContractId}";
            CBA.Checkout.sendMsg( messageToOpener, fullMessage, '<c:out value="${viewer.merchantUrl}"/>');
            window.close();
            window.opener.focus()
    ====
    Is there any tips on how i can close the LOGIN window, and redirect the client page to a new URL, and make the Client window full screen?
    Any tips would be appreciated.
    Thanks

    I have made  a static script that I try and use to do something similar - it works everywhere else just not on the iphone..
    <script>
    (function(){
    do something to make 'tok'..the following post message sends the original script 'tok' it just isnt working only on iphone
    window.opener.postMessage(tok,"http://gamerdj.net.gridhosted.co.uk/");
    alert('wois '+window.opener);
    self.close();
    </script>
    I use the above after authenticating with google and getting a token back in this case tok and this needs passing back to the original app. I would prefer not to launch a new window and have this mess but becasue the google API wont accept a proper route url for angular I cant get that to work. This way was the closest that I got.

  • [SOLVED] KDE: window focus transfer options

    Hi,
    There's a way of using Emacs and LaTeX (AUCTeX): Emacs and Okular work in a team. LaTeX generates pdf; C-c C-v gets you to the same line of text in Okular holding the generated pdf (forward search). Okular window gets focus, which is nice and proper. In Okular you can Shift-click on any line and get to the same line in Emacs (inverse search). No clear transmission of focus this time -- but only in KDE, as it turned out.
    In LXDE everything works just as it should, to my great surprise: Emacs window gets focus and pops on top of the Okular window if necessary. Are there some window behavior options in KDE which I could try?
    Last edited by Llama (2014-12-04 13:50:09)

    System settings->Window behavior->Focus->Focus stealing prevention: None

  • Safari Beta 4 child window focus problem

    It seems that Safari/Windows Beta 4 does not properly focus a child window. In my case, I'm using Javascript to directly intercept keystrokes. If a new page is opened in the same window, the keyboard works just fine. If it's opened in a child window, the keyboard is ignored until the window is manually focused (mouse click). This behaviour is unique to Safari on Windows. On the Mac, it's fine. On all other browsers and operating systems, it's fine.
    You can see an example at http://sentientdata.com/focustest/kbug_demo.html .

    Sounds like it might be a question of the Developer forum? Or a some other forum on web design? This is a user-to-user tech support forum.
    Best of luck.

  • Window focus bug

    A while ago (since two or three updates) I started having window focus problems.
    When I uese expose to switch to a window, the application does not focus, and the window stays covered by some other window (usually the application that pops back up is Mail, Safari, or Finder).
    This is an extremely annoying bug, does anybody now how to fix it?
    I don't know if this can help, but I've upgraded my system from 10.3, all the way to 10.4.5 using the several updates. I use an external mouse, but I get the bug using the trackpad as well.
    Also, I don't know if the two problems are related, but I get very odd bugs in ICal with the mouse (clicking on an event changes the scroll status on the events pane and I end up selecting a random task with that same click...)
    Thanks,
    JS
    Powerbook G4 12   Mac OS X (10.4.5)   System upgraded from 10.3
    Powerbook G4 12   Mac OS X (10.4.5)   System upgraded from 10.3

    Create a new account, name it "test" and see how Expose and iCal work in that User acct? (That will tell if your problem is systemwide or limited to your User acct.) This account is just for test, do nothing further with it.
    Open System Preferences >> Accounts >> "+" make it an admin account.
    Let us know and we'll troubleshoot this further.

  • Problem with new firefox tabs and window focus

    Here's a problem that I've had for ages - sometimes it annoys me, other times I can live with it. Right now it's really p***ing me off.  :x
    I have selected 'a new tab in the most recent window' under FF's Preferences->Tabs->Open links from other applications in:, so as an example, if I click on a URL in a mail in Thunderbird, Firefox opens it in a new tab. However, window focus stays on Thunderbird. I run both of them full screen, so although I'm looking at the web page in Firefox, anything I do on the keyboards affects Thunderbird. It affects URLs opened from other apps too e.g. if I open a terminal and do
    firefox www.archlinux.org
    focus stays on the terminal window. The only exception is when firefox is not already running - in that case, firefox launches with focus.
    DE is xfce4, and the system is completely up to date.
    I've done some googling, and AFAICS, nobody else seems to have this problem. Any ideas, anyone?
    TIA.

    Thanks MAC!EK - definitely a useful add-on, but it still doesn't solve my problem. In Tab Mix Plus Options, I have the following selected:
    Links -> Open links from other applications in: New tab
    Events-> Tab Focus -> Focus/Select tabs  that open from: <all>
    However, the behaviour is as before i.e. I click a URL in Thunderbird, it opens in a new tab in Firefox, but window focus stays on Thunderbird. Within Firefox, the newly-opened tab is selected or focussed, but Firefox itself is not.
    Anyway, thanks again. I think I need to keep looking.

  • Problem with onBlur="window.focus()"

    Hi,
    inside the body tag of a popup widow i have used onBlur="window.focus()" and it is working fine i.e. when i tried to click on parent window the focus transfers back to popup window but i tried this by clicking like hundred times it fails i.e. the focus transfers to parent window.
    Does this function depends on number of click.
    manish

    Hi,
    No the problem is still there and it is not related to no of clicks because today for the just first time it failed.
    U have written
    "except maybe you can use onBlur and onFocus to set a variable to indicate the state and use setInterval to constantly check that every couple seconds as a backup to push it forward."
    i have not used this setInterval. ok let me tell u how i have used.
    In the parent page when it popups a window i have set a flag(global var.) to true and in the body tag (of parent itself) i used "onFocus="javascript:chkChildWin()""
    <script language="Javascript" >
    function chkChildWin()
    if(childFlag)
              cal_setFocus()// method to set the focus to popupwindow
    </script>and inside the popup window body tag i used
    onBlur="window.focus()"
    when user selects some thing from popup window or it closes the popup window then variable is reset to false. and as it is clear from the above mentioned code that parent window checks this flag on its focus method.
    sometimes it work fine and sometimes it does not.
    I don't know how to solve a problem which is not consistent, i mean this occurs randomly.
    plz help me out
    manish

  • Lasso tool problem, using alt key, no click within 5sec causes loss of active window focus

    I have been using Photoshop since ver. 4 and have never seen this happen.  The only difference is now I'm on Windows 7 64bit.  Did not have this problem with XP.  Current version CS3 Extended.
    Problem: While using Lasso tool with the alt key if I do not make a mouse click in 5 seconds Photoshop's active window loses focus for a split second and then the first point of my selection and the last point will connect.  Thus, wasting my time and my attempt at a selection.
    I have task bar buttons to "Never combine".  I see for that split second what appears to be another program button opening but it is so fast that I cannot see if there is a name on the task bar button.  The current Photoshop button moves to the right and back too fast.  This all happens very quickly as the window loses focus.
    I first thought it was some another program but after many searches found nothing I can identify as the cause.
    Right before posting this I had a thought and did a test that concluded in the 5 sec rule. For over a minute I held down the alt key and made a mouse click within the 5 second window of time and there was no loss of window focus.  While still holding down the alt key in this same test but not making a mouse click within 5 seconds the window lost focus and the tool stopped with my selection.
    I have a wireless Logitech M305 mouse that this morning updated the driver to its current version 5.20.51, Control Center version: 6.20.50.
    I have not tested a wired mouse, yet.
    Any help would be appreciated.  Anyone else seen this?  Windows 7 64 bit the culprit?????
    Message was edited by: golfnut333

    UPDATE
    After I removed Photoshop from Norton 360's Administrative Settings_Silent Mode Settings_User-Specified Programs, I did not have the problem with the lasso tool that I first had with loss of window focus.  I then put Photoshop back in the 360's settings and the lasso tool still worked, BUT...............
    After a couple of days of not using Photoshop and turning computer on and off in that time, I tried Photoshop again and the same problem, it came back.  Loss of focus after 5 seconds of not clicking mouse.  So, once again I open Norton and took Photoshop out of the User-Specified Programs and the problem went away, no loss of focus.
    So, I will see if after a couple of days of turning on and off the computer and NOT putting Photoshop in the Norton's User-Specified Programs setting if the problem stays fixed.
    I don't have to have Photoshop in the Norton's setting I just thought that it would be a good idea so Norton didn't try to do any background processes or whatever while I was working in Photoshop or I was rendering a filter or something.
    Another thought I also have the Full Screen Detection setting ON.  I do use Photoshop in Full Screen mode so maybe when having both the Full Screen mode and User-Specified Programs setting selected it makes something go wacky.
    Hope this helps anyone having the same problem I "did".  Will post back after a few days to let you know if focus problem is gone.
    If it does relieve the problem then I will leave Photoshop off the list in Norton.  No sense in trying to fix something that really doesn't matter, really.
    UPDATE 2
    January 8, 2011, I tried the lasso tool again and it still appears to be working. I did my standard test of holding the alt key and clicking to make selections then not click for 5 seconds or more and I did not lose window focus.  I do not know why the Norton 360 setting triggers the loss of focus but since I turned that setting off I'm not having any problem.
    Will update again if something changes.
    Anyone else out there with the same problem that was solved using this method?
    Message was edited by: golfnut333

  • [SOLVED] GNOME 3.8 annoying window resize problem

    Hello all fellow early-adopters :-)
    A very annoying quirk I've noticed, moving from GNOME 3.6 to 3.8, is that it no longer remembers, nor retains, the size/positions I set for many of my application windows. For example, my mail client (Evolution) is sized to fill most of my screen (centrally), with Empathy and Skype as long narrow windows on both sides - giving me a nice, broad "communications" overview on that particular desktop (with dev tools etc open on others).
    On 3.6, this layout was retained during my session, as well as next time I started these apps up.
    In GNOME 3.8, not only does it insist that these windows are always started as small little bunched-up windows that I need to resize, but every time a window displays a notification/warning (message in internal yellow bar inside the window - such as loss of internet connection, mail retrieval failure etc) it resizes the windows spontaneously to a stupid, small size that overlays the other windows. This is driving me crazy!
    Where can I learn a bit more about how window sizing / positioning works in GNOME 3.8, or is it finally time to switch to awesome wm? I want to love GNOME 3.8, I really do. It's so slick, but so... unpolished.
    I want to dig in an assist with problems like these, but I need some pointers to some background material first to understand the problem. Is it the window manager? Is it the app?
    ** UPDATE: Doing a full system upgrade, as of May 18, 2013, has resolved this annoying problem. My windows now stay where they belong, and start with the same size they were closed with. GNOME is now pleasant to use again :-)
    Last edited by dawid.loubser (2013-05-21 13:37:25)

    dawid.loubser wrote:Thanks for the suggestion drtebi - I'll give it a try.
    I really like GNOME 3.x though (and would like to understand the windowing behaviour), but if the annoying quirks are insurmountable, I will happily switch.
    Man I love GNOME 3.x. I admire the courage they had to change, basically, everything, and I find myself more productive with my GNOME 3 Arch box than with my good ol' Slackware KDE 4 box. I just hate those bugs - for example I filed a task in their bugtracker for this window resize problem I have with gedit. If it's a love/hate relationship, I think it's marriage ^_^
    With the 3.8 upgrade, deadbeef was having a similar problem with window size/position. I just recompiled it against the latest GTK+3 package upgrade (that came after the 'big upgrade' here on Arch) and it was fixed. But not with gedit
    bwat47 wrote:
    Man I really hope this gets fixed soon, because aside from this one incredibly annoying issue I am loving gnome 3.8.
    I get the feeling gnome badly needs more beta testers, sizable regressions like this in "stable" releases happen way too often sad.
    I get the exact same feeling. Well bugs exist everywhere, there's no denying. But I think it would be wiser to 'alternate' the nature of each major stable release - one focusing on new features and one focusing on fixing bugs. For example if the only new features in GNOME 3.10 were the AppsFolder full implementation and the introduction of gnome-calendar, and the rest of the development cicle being devoted to fix bugs, I'd be more than happy.
    Like Fedora and Ubuntu, the fixed 6-month release cycle colaborates with the bugs. They don't do like Debian or Slackware which are released 'when they are ready'.
    EDIT: fout (yet) another bug. At least with facebook chat (haven't tested with other telepathy plugins) the buddy tray icon appear duplicate. Anybody with the same issue?
    Last edited by lmello (2013-05-02 14:06:06)

  • Focus Problem on Solaris with jdk 1.3.1

    Hi all,
    We are having a focus problem on Solaris. The same code works fine on Windows without any problem.
    I am sending the test code and run steps below which you can compile and repeat the problem.
    NOTE: When we put a comment on the line "f1.requestFocus();" in TestFocus.java it works OK.
    Run Steps :
    1. Run TestFocus.class
    2. A JFrame appears with 2 text field and a button
    3. Try to write something on the text fields. It works OK.
    4. Click the button to open a new JFrame
    5. A new JFrame opens with a single text field and a button.
    6. Click the button to close the second frame
    7. You are now on the main JFrame
    8. Try to write something on the text fields. It works OK.
    9. Repeat the steps 4-7
    10. Try to write something on the text fields. You are able to focus and write on the first field. BUT you cannot select or write the second Field!
    JAVA SOURCE FILES :
    PenHesapListener.java :
    public interface PenHesapListener extends java.util.EventListener {
    void tamam_actionPerformed(java.util.EventObject newEvent);
    void iptal_actionPerformed(java.util.EventObject newEvent);
    ------PenHesapLisEventMulticaster.java----------------------------------
    public class PenHesapLisEventMulticaster extends java.awt.AWTEventMulticaster implements PenHesapListener {
    * Constructor to support multicast events.
    * @param a java.util.EventListener
    * @param b java.util.EventListener
    protected PenHesapLisEventMulticaster(java.util.EventListener a, java.util.EventListener b) {
         super(a, b);
    * Add new listener to support multicast events.
    * @return muhasebe.HesappenListener
    * @param a muhasebe.HesappenListener
    * @param b muhasebe.HesappenListener
    public static PenHesapListener add(PenHesapListener a, PenHesapListener b) {
         return (PenHesapListener)addInternal(a, b);
    * Add new listener to support multicast events.
    * @return java.util.EventListener
    * @param a java.util.EventListener
    * @param b java.util.EventListener
    protected static java.util.EventListener addInternal(java.util.EventListener a, java.util.EventListener b) {
         if (a == null) return b;
         if (b == null) return a;
         return new PenHesapLisEventMulticaster(a, b);
    * @return java.util.EventListener
    * @param oldl muhasebe.HesappenListener
    protected java.util.EventListener remove(PenHesapListener oldl) {
         if (oldl == a) return b;
         if (oldl == b) return a;
         java.util.EventListener a2 = removeInternal(a, oldl);
         java.util.EventListener b2 = removeInternal(b, oldl);
         if (a2 == a && b2 == b)
              return this;
         return addInternal(a2, b2);
    * Remove listener to support multicast events.
    * @return muhasebe.HesappenListener
    * @param l muhasebe.HesappenListener
    * @param oldl muhasebe.HesappenListener
    public static PenHesapListener remove(PenHesapListener l, PenHesapListener oldl) {
         if (l == oldl || l == null)
              return null;
         if(l instanceof PenHesapLisEventMulticaster)
              return (PenHesapListener)((PenHesapLisEventMulticaster) l).remove(oldl);
         return l;
    public void tamam_actionPerformed(java.util.EventObject newEvent) {
         ((PenHesapListener)a).tamam_actionPerformed(newEvent);
         ((PenHesapListener)b).tamam_actionPerformed(newEvent);
    public void iptal_actionPerformed(java.util.EventObject newEvent) {
         ((PenHesapListener)a).iptal_actionPerformed(newEvent);
         ((PenHesapListener)b).iptal_actionPerformed(newEvent);
    ---------TestFocus2.java-----------------------------------------
    import javax.swing.*;
    import javax.swing.JOptionPane;
    import java.awt.event.WindowAdapter;
    import java.awt.event.KeyListener;
    import java.awt.event.KeyAdapter;
    import java.awt.event.KeyEvent;
    import java.awt.event.ActionEvent;
    import java.awt.event.WindowEvent;
    import java.awt.event.ActionListener;
    import java.util.ArrayList;
    import java.util.StringTokenizer;
    import java.text.SimpleDateFormat;
    import java.awt.Dimension;
    import java.awt.Toolkit;
    import java.awt.Color;
    import java.util.Locale;
    import java.util.ResourceBundle;
    public class TestFocus2 extends JFrame implements ActionListener
         protected transient PenHesapListener PenhListener = null ;
         JTextField f10 = null;
         JButton b10= null ;
         JTextField f1 = new JTextField() ;
         JButton b1 = new JButton() ;
         JFrame f20 = null;
         public TestFocus2()
              getContentPane().setLayout(new BoxLayout(getContentPane(), BoxLayout.Y_AXIS));
              getContentPane().add(f1);
              getContentPane().add(b1);
              pack();
              setVisible(true);
              b1.addActionListener(this);
         public void actionPerformed(ActionEvent e)
              if(e.getSource() == b1)
                   fireTamam_actionPerformed(e);
         public void addPenHesapListener(PenHesapListener newListener)
              PenhListener = PenHesapLisEventMulticaster.add(PenhListener, newListener);
              return;
         protected void fireTamam_actionPerformed(java.util.EventObject newEvent) {
              PenhListener.tamam_actionPerformed(newEvent);
              this.setVisible(false);
         protected void fireiptal_actionPerformed(java.util.EventObject newEvent) {
              PenhListener.iptal_actionPerformed(newEvent);
         public static void main(String x[])
              TestFocus2 gen01 = new TestFocus2();
    --------TestFocus.java-----------------------------------
    import javax.swing.*;
    import javax.swing.JOptionPane;
    import java.awt.event.WindowAdapter;
    import java.awt.event.KeyListener;
    import java.awt.event.KeyAdapter;
    import java.awt.event.KeyEvent;
    import java.awt.event.ActionEvent;
    import java.awt.event.WindowEvent;
    import java.awt.event.ActionListener;
    import java.util.ArrayList;
    import java.util.StringTokenizer;
    import java.text.SimpleDateFormat;
    import java.awt.Dimension;
    import java.awt.Toolkit;
    import java.awt.Color;
    import java.util.Locale;
    import java.util.ResourceBundle;
    import java.awt.Container;
    public class TestFocus extends JFrame implements ActionListener
         PenKreKart aPenKreKart = null ;      
         Container ctn = null;
         JTextField f10 = null;
         JButton b10= null ;
         JTextField f1 = new JTextField() ;
         JTextField f2 = new JTextField() ;
         JButton b1 = new JButton() ;
         JFrame f20 = null;
         public TestFocus()
              //aPenKreKart = new PenKreKart(true);
              //aPenKreKart.aTemelPencere.setVisible(false);
              getContentPane().setLayout(new BoxLayout(getContentPane(), BoxLayout.Y_AXIS));
              getContentPane().add(f1);
              getContentPane().add(f2);
              getContentPane().add(b1);
              pack();
              setVisible(true);
              b1.addActionListener(this);
         public void actionPerformed(ActionEvent e)
              if(e.getSource() == b1)
                   pencere_islemi();
         // pencere koyma k?sm? .. begin                               
         public void pencere_islemi() {     
              ctn = this;
              ctn.setEnabled(false);
              TestFocus2 fpen = new TestFocus2();
              //aPenKreKart.aTemelPencere.setVisible(true); //buras?          
              //aPenKreKart.aTemelPencere.addPenHesapListener(new PenHesapListener() {
              fpen.addPenHesapListener(new PenHesapListener() {
                        // metod      tamam_actionPerformed begin...          
                        public void tamam_actionPerformed(java.util.EventObject newEvent) {
                             ctn.setEnabled(true);
                             ctn.requestFocus();
                             // Problem is when we comment the below line it works .....
                             f1.requestFocus();
                             System.out.println("tamam");
                        // metod      tamam_actionPerformed end...          
                        // metod      iptal_actionPerformed begin...          
                        public void iptal_actionPerformed(java.util.EventObject newEvent) {
                             ctn.setEnabled(true);
                             ctn.requestFocus();
                             System.out.println("iptal");
                        // metod      iptal_actionPerformed begin...          
         // pencere koyma k?sm? .. end                               
         public static void main(String x[])
              TestFocus gen01 = new TestFocus();

    Hi all,
    We are having a focus problem on Solaris. The same code works fine on Windows without any problem.
    I am sending the test code and run steps below which you can compile and repeat the problem.
    NOTE: When we put a comment on the line "f1.requestFocus();" in TestFocus.java it works OK.
    Run Steps :
    1. Run TestFocus.class
    2. A JFrame appears with 2 text field and a button
    3. Try to write something on the text fields. It works OK.
    4. Click the button to open a new JFrame
    5. A new JFrame opens with a single text field and a button.
    6. Click the button to close the second frame
    7. You are now on the main JFrame
    8. Try to write something on the text fields. It works OK.
    9. Repeat the steps 4-7
    10. Try to write something on the text fields. You are able to focus and write on the first field. BUT you cannot select or write the second Field!
    JAVA SOURCE FILES :
    PenHesapListener.java :
    public interface PenHesapListener extends java.util.EventListener {
    void tamam_actionPerformed(java.util.EventObject newEvent);
    void iptal_actionPerformed(java.util.EventObject newEvent);
    ------PenHesapLisEventMulticaster.java----------------------------------
    public class PenHesapLisEventMulticaster extends java.awt.AWTEventMulticaster implements PenHesapListener {
    * Constructor to support multicast events.
    * @param a java.util.EventListener
    * @param b java.util.EventListener
    protected PenHesapLisEventMulticaster(java.util.EventListener a, java.util.EventListener b) {
         super(a, b);
    * Add new listener to support multicast events.
    * @return muhasebe.HesappenListener
    * @param a muhasebe.HesappenListener
    * @param b muhasebe.HesappenListener
    public static PenHesapListener add(PenHesapListener a, PenHesapListener b) {
         return (PenHesapListener)addInternal(a, b);
    * Add new listener to support multicast events.
    * @return java.util.EventListener
    * @param a java.util.EventListener
    * @param b java.util.EventListener
    protected static java.util.EventListener addInternal(java.util.EventListener a, java.util.EventListener b) {
         if (a == null) return b;
         if (b == null) return a;
         return new PenHesapLisEventMulticaster(a, b);
    * @return java.util.EventListener
    * @param oldl muhasebe.HesappenListener
    protected java.util.EventListener remove(PenHesapListener oldl) {
         if (oldl == a) return b;
         if (oldl == b) return a;
         java.util.EventListener a2 = removeInternal(a, oldl);
         java.util.EventListener b2 = removeInternal(b, oldl);
         if (a2 == a && b2 == b)
              return this;
         return addInternal(a2, b2);
    * Remove listener to support multicast events.
    * @return muhasebe.HesappenListener
    * @param l muhasebe.HesappenListener
    * @param oldl muhasebe.HesappenListener
    public static PenHesapListener remove(PenHesapListener l, PenHesapListener oldl) {
         if (l == oldl || l == null)
              return null;
         if(l instanceof PenHesapLisEventMulticaster)
              return (PenHesapListener)((PenHesapLisEventMulticaster) l).remove(oldl);
         return l;
    public void tamam_actionPerformed(java.util.EventObject newEvent) {
         ((PenHesapListener)a).tamam_actionPerformed(newEvent);
         ((PenHesapListener)b).tamam_actionPerformed(newEvent);
    public void iptal_actionPerformed(java.util.EventObject newEvent) {
         ((PenHesapListener)a).iptal_actionPerformed(newEvent);
         ((PenHesapListener)b).iptal_actionPerformed(newEvent);
    ---------TestFocus2.java-----------------------------------------
    import javax.swing.*;
    import javax.swing.JOptionPane;
    import java.awt.event.WindowAdapter;
    import java.awt.event.KeyListener;
    import java.awt.event.KeyAdapter;
    import java.awt.event.KeyEvent;
    import java.awt.event.ActionEvent;
    import java.awt.event.WindowEvent;
    import java.awt.event.ActionListener;
    import java.util.ArrayList;
    import java.util.StringTokenizer;
    import java.text.SimpleDateFormat;
    import java.awt.Dimension;
    import java.awt.Toolkit;
    import java.awt.Color;
    import java.util.Locale;
    import java.util.ResourceBundle;
    public class TestFocus2 extends JFrame implements ActionListener
         protected transient PenHesapListener PenhListener = null ;
         JTextField f10 = null;
         JButton b10= null ;
         JTextField f1 = new JTextField() ;
         JButton b1 = new JButton() ;
         JFrame f20 = null;
         public TestFocus2()
              getContentPane().setLayout(new BoxLayout(getContentPane(), BoxLayout.Y_AXIS));
              getContentPane().add(f1);
              getContentPane().add(b1);
              pack();
              setVisible(true);
              b1.addActionListener(this);
         public void actionPerformed(ActionEvent e)
              if(e.getSource() == b1)
                   fireTamam_actionPerformed(e);
         public void addPenHesapListener(PenHesapListener newListener)
              PenhListener = PenHesapLisEventMulticaster.add(PenhListener, newListener);
              return;
         protected void fireTamam_actionPerformed(java.util.EventObject newEvent) {
              PenhListener.tamam_actionPerformed(newEvent);
              this.setVisible(false);
         protected void fireiptal_actionPerformed(java.util.EventObject newEvent) {
              PenhListener.iptal_actionPerformed(newEvent);
         public static void main(String x[])
              TestFocus2 gen01 = new TestFocus2();
    --------TestFocus.java-----------------------------------
    import javax.swing.*;
    import javax.swing.JOptionPane;
    import java.awt.event.WindowAdapter;
    import java.awt.event.KeyListener;
    import java.awt.event.KeyAdapter;
    import java.awt.event.KeyEvent;
    import java.awt.event.ActionEvent;
    import java.awt.event.WindowEvent;
    import java.awt.event.ActionListener;
    import java.util.ArrayList;
    import java.util.StringTokenizer;
    import java.text.SimpleDateFormat;
    import java.awt.Dimension;
    import java.awt.Toolkit;
    import java.awt.Color;
    import java.util.Locale;
    import java.util.ResourceBundle;
    import java.awt.Container;
    public class TestFocus extends JFrame implements ActionListener
         PenKreKart aPenKreKart = null ;      
         Container ctn = null;
         JTextField f10 = null;
         JButton b10= null ;
         JTextField f1 = new JTextField() ;
         JTextField f2 = new JTextField() ;
         JButton b1 = new JButton() ;
         JFrame f20 = null;
         public TestFocus()
              //aPenKreKart = new PenKreKart(true);
              //aPenKreKart.aTemelPencere.setVisible(false);
              getContentPane().setLayout(new BoxLayout(getContentPane(), BoxLayout.Y_AXIS));
              getContentPane().add(f1);
              getContentPane().add(f2);
              getContentPane().add(b1);
              pack();
              setVisible(true);
              b1.addActionListener(this);
         public void actionPerformed(ActionEvent e)
              if(e.getSource() == b1)
                   pencere_islemi();
         // pencere koyma k?sm? .. begin                               
         public void pencere_islemi() {     
              ctn = this;
              ctn.setEnabled(false);
              TestFocus2 fpen = new TestFocus2();
              //aPenKreKart.aTemelPencere.setVisible(true); //buras?          
              //aPenKreKart.aTemelPencere.addPenHesapListener(new PenHesapListener() {
              fpen.addPenHesapListener(new PenHesapListener() {
                        // metod      tamam_actionPerformed begin...          
                        public void tamam_actionPerformed(java.util.EventObject newEvent) {
                             ctn.setEnabled(true);
                             ctn.requestFocus();
                             // Problem is when we comment the below line it works .....
                             f1.requestFocus();
                             System.out.println("tamam");
                        // metod      tamam_actionPerformed end...          
                        // metod      iptal_actionPerformed begin...          
                        public void iptal_actionPerformed(java.util.EventObject newEvent) {
                             ctn.setEnabled(true);
                             ctn.requestFocus();
                             System.out.println("iptal");
                        // metod      iptal_actionPerformed begin...          
         // pencere koyma k?sm? .. end                               
         public static void main(String x[])
              TestFocus gen01 = new TestFocus();

  • Window Focus Lost After Saving Page - Any Way To Get It Back With Keyboard?

    I've recently begun using Safari for Windows after having used Opera for years, and have run into a problem with window focus that I didn't have with Opera. Specifically, if you save a web page in Safari, you then find that the following functions are no longer available from the keyboard:
    1. Going back to a web page previous to the one that you just saved. Ctrl+[ does not function.
    2. Performing a search. Ctrl+F does not function.
    3. Scrolling to the bottom or top of the page. Ctrl+End and Ctrl+Home do not function. (For some reason, however, the PageUp and PageDown keys do still work in this situation.)
    Why is this, and more importantly, is there a quick and easy way that you can, using only the keyboard, regain the window focus so that these functions will work again? I'm currently having to click somewhere on the page I've just saved in order to regain the focus. This is a nuisance.
    Thanks for any advice.
    George
    Message was edited by: safwin

    Thanks very much. Hitting 'Alt' button after saving the page does resolve the first (and most important) two of the three issues I listed above. FWIW, the Ctrl+End and Ctrl+Home functions only work in this post-save scenario (as I discovered by experimenting a few minutes ago) if you hit the 'Alt' button twice (or if you do something else, like perform a search and then use Ctrl+End/Home).
    By the way, before posting a few days ago, I had tried using the Alt+Tab method when I had two or more applications' windows open, and it didn't help. But, after reading your last post, I've found that if you use Alt+Tab when Safari is the only window open, then it does resolve the issue, although of course, as you've indicated, it's not actually necessary to hit the 'Tab' key.
    Thanks again!
    George
    Message was edited by: safwin

  • Calling1.4.1 signed applet from Javascript causes keyboard/focus problems

    Pretty sure there's a JRE bug here, but I'm posting to forums before I open one in case I'm missing something obvious :-)
    This issue may be specific to IE, I haven't tested elsewhere yet. Our web application is centered around a signed applet that is initialized with XML data via Javascript. We first noticed the problem when our users started upgrading from the 1.3.x plug-in to the 1.4.x plug-in. The major symptom was that shortcut keys stopped working. I debugged the problem off and on for about a month before I boiled it down to a very simple program that demonstrates the issue (included below). Basically, the program has a function that adds a JButton to a JPanel and registers a keyboard listener (using the new DefaultKeyboardFocusManager class) that prints a message to the console. This function is called by the applet's init() method, as well as by a public method that can be called from Javascript (called callMeFromJavascript()). I also included a very simple HTML file that provides a button that calls the callMeFromJavascript() method. You can test this out yourself: To recreate, compile the class below, JAR it up, sign the JAR, and put in the same dir with the HTML file. Load the HTML file in IE 5.0 or greater, and bring the console up in a window right next to it. Now click the button that says init--you should see the small box appear inside the button that indicates it has the focus. Now press some keys on your keyboard. You should see "KEY PRESSED!!!" appearing in the console. This is proper behavior. Now click the Init Applet from Javascript button. It has removed the button called init, and added one called "javascript". Press this button. Notice there is no focus occurring. Now press your keyboard. No keyboard events are registered.
    Where is gets interesting is that if you go back and make this an unsigned applet, and try it again, everything works fine. This bug only occurs if the applet is signed.
    Furthermore, if you try it in 1.3, signed or unsigned, it also works. So this is almost certainly a 1.4 bug.
    Anyone disagree? Better yet, anyone have a workaround? I've tried everything I could think of, including launching a thread from the init() method that sets up the components, and then just waits for the data to be set by Javascript. But it seems that ANY communication between the method called by Javascript and the code originating in init() corrupts something and we don't get keyboard events. This bug is killing my users who are very reliant on their shortcut keys for productivity, and we have a somewhat unique user interface that relies on Javascript for initialization. Any help or suggestions are appreciated.
    ================================================================
    Java Applet (Put it in a signed JAR called mainapplet.jar)
    ================================================================
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    public class MainApplet extends JApplet implements KeyEventDispatcher
        JPanel test;
        public void init()
            System.out.println("init called");
            setUp("init");
        public void callMeFromJavascript()
            System.out.println("callMeFromJavascript called");
            setUp("javascript");
        private void setUp(String label)
            getContentPane().removeAll();
            test = new JPanel();
            getContentPane().add( test );
            JButton button = new JButton(label);
            test.add( button );
            test.updateUI();
            DefaultKeyboardFocusManager.getCurrentKeyboardFocusManager().addKeyEventDispatcher(this);
        public boolean dispatchKeyEvent(KeyEvent e)
            System.out.println("== KEY PRESSED!!! ==");
            return false;
    }================================================================
    HTML
    ================================================================
    <form>
    <APPLET code="MainApplet" archive="mainapplet.jar" align="baseline" id="blah"
         width="200" height="400">
         No Java 2 SDK, Standard Edition v 1.4.1 support for APPLET!!
    </APPLET>
    <p>
    <input type="button" onClick="document.blah.callMeFromJavascript();" value="Init Applet via Javascript">
    </form>

    I tried adding the requestFocus() line you suggested... Same behavior.
    A good thought, but as I mention in my description, the applet has no trouble gaining the focus initially (when init() is called). From what I have seen, it is only when the call stack has been touched by Javascript that I see problems. This is strange though: Your post gave me the idea of popping the whole panel into a JFrame... I tried it, and the keyboard/focus problem went away! It seems to happen only when the component hierarchy is descended from the JApplet's content pane. So that adds yet another variable: JRE 1.4 + Signed + Javascript + components descended from JApplet content pane.
    And yes, signed or unsigned DOES seem to make a difference. Don't ask me to explain why, but I have run this little applet through quite a few single variable tests (change one variable and see what happens). The same JAR that can't receive keyboard events when signed, works just fine unsigned. Trust me, I'm just as baffled as you are.

Maybe you are looking for

  • Retriving tha multiple records at a time

    Hi I have a doubt regarding multiple records retriving at a time(for example 20 records) from my database into my jsp page.please give me the answer for this query

  • Mac Mini is a let down

    Got a phone call from my family again, seems like they are having more trouble with the Mac Mini. I downloaded some demos to my flash-drive using my PC, my connection is faster on my laptop, can download Halo Demo in a few minutes, much faster than w

  • Icloud storage and syncing

    when i go into my icloud and to storage details its showing me my old phones, if i delete those withh everything stay on my phone? or will it deleteic

  • Date parameters in WebI XI

    Post Author: foxy CA Forum: WebIntelligence Reporting If you have a date parameter or a date range parameter, is it possible for the user to leave the prompt blank if they wish? or does WebI XI force a value to be entered for the prompt? Thanks Foxy

  • Norton Antivirus X

    I recently installed Norton Anti-Virus 10 for MAC OSX 10.4. When I did a virus scan, it found 28 files infected with a virus, all files, I believe received from PC users. Norton Anti-virus was unable to repair the files and did not quarantine them. A