XMonad scratchpad focusing wrong window

In Xmonad, when I hide a scratchpad window using my designated hotkey, the focus does not return to the previous window, but to whatever window that has a lower position in the stackset (I think); this is an annoying problem, especially when I'm in the full screen layout.
Anyone experiencing the same problem or has come up with a fix?

Now I think more about it, some sort of ordering on the stackset such that whenever a window is closed then the most recently used window is focused should just do it..

Similar Messages

  • Command key activates wrong window in Mountain Lion

    I've got some strange bug on my computer that has stumped every genius in the three Apple Stores I've been to--they even took it to the back to ask all the Genius' in the store, so it seems to be a nasty bug. so I figured maybe you all could help me out.
    The issue is this: After I upgraded to Mountain Lion (from Snow Leopard) when I use my "command" key, it randomly activates a window other than the one in focus (on top) of the other windows.  So, for example, if I'm in Safari and try to copy something (Cmd+C) but I also have Word open, it will switch to Word and copy whatever is in Word.  It does this with all programs (even with Finder!), no matter what the Command function I'm trying to use.  If I close the program, the strange behavior will stop for a short time and then come back with another program.  When Cmd activates Finder, I have to relaunch Finder and that temporarily alleviates the problem.  It does this odd behavior with an external keyboard (and the on-screen keyboard), meaning that it's a software, not hardware error.
    I have taken the following actions to fix the problem:
    - Reset PRAM (no change to problem)
    - Using Disk Utility to repair permissions and verify disk (no change to problem)
    - Created a new user on the computer (problem re-appeared after importing my backup files using MigrationAssistant)
    - Created a new user on the computer and imported files without importing "Settings" but problem reappeared
    - Reinstalled Mountain Lion (problem appeared after importing my backup files using MigrationAssistant)
    The last Genius thought the error was due to an application corrupting some system-wide file in Mountain Lion, so we wiped my hard drive, reinstalled files, and imported my documents but not my apps.  I manually installed one app at a time and had no issues for 3 months or so.
    The problem "randomly" came back last week.  Looking at apps that were installed recently, it shows:
    - Flux (update - but Flux was on my computer for 3 months with no issues)
    - Quicksand (update - but Quicksand was NOT on my computer last year when the problem started)
    - VLC Media Player (this WAS on my computer last year but was NOT on my computer in the 3 months with no issue).
    Thus, it seems that the culprit app was VLC.  I've deleted it (using AppTrap to clear system files), but the problem still exists.
    So, three questions:
    1)  Does anyone have any idea why this is happening, how to prevent it, or whether it might start again even if I wipe and reinstall everything?
    2) I'd like to fix the problem without wiping my computer and doing a clean install of everything.  Any ideas of how I could avoid doing that?
    3) If I have to sacrifice VLC to solve the problem, fine, but I'd prefer not to.  Any ideas as to how I could use it still?
    TLDR: Command key activates wrong window in Mountain Lion; confirmed software issue; reinstall worked fine until installed VLC Media Player and problem returned; how do I fix it?
    themarkofbooks
    MBPro (mid 2009) on 10.8.5
    Regularly (near daily) backup to TimeMachine

    Hardware Information:
              MacBook Pro (13-inch, Mid 2009)
              MacBook Pro - model: MacBookPro5,5
              1 2.53 GHz Intel Core 2 Duo CPU: 2 cores
              8 GB RAM
    Video Information:
              NVIDIA GeForce 9400M - VRAM: 256 MB
    Startup Items:
              HP IO - Path: /Library/StartupItems/HP IO
              HP Trap Monitor - Path: /Library/StartupItems/HP Trap Monitor
    System Software:
              OS X 10.8.5 (12F45) - Uptime: 1 day 13:6:33
    Disk Information:
              HGST HTS721010A9E630 disk0 : (1 TB)
                        disk0s1 (disk0s1) <not mounted>: 209.7 MB
                        Macintosh HD (disk0s2) /: 999.35 GB (65.22 GB free)
                        Recovery HD (disk0s3) <not mounted>: 650 MB
              HL-DT-ST DVDRW  GS23N 
    USB Information:
              Apple Inc. Built-in iSight
              Seagate Expansion Desk 3 TB
                        disk1s1 (disk1s1) <not mounted>: 314.6 MB
                        Time Machine (disk1s2) /Volumes/Time Machine: 1.75 TB (661.99 GB free)
                        Boot OS X (disk1s3) <not mounted>: 134.2 MB
                        Seagate (disk1s4) /Volumes/Seagate: 1.25 TB (1.25 TB free)
              Apple Internal Memory Card Reader
              HP Deskjet F300 series
              Apple Inc. Apple Internal Keyboard / Trackpad
              Apple Computer, Inc. IR Receiver
              Apple Inc. BRCM2046 Hub
                        Apple Inc. Bluetooth USB Host Controller
    FireWire Information:
    Thunderbolt Information:
    Kernel Extensions:
              com.Cvnt.nke          (2.2.0)
              com.Cvnt.driver.CvntDriver          (2.2.0)
    Problem System Launch Daemons:
    Problem System Launch Agents:
    Launch Daemons:
              [loaded] com.adobe.fpsaud.plist
              [loaded] com.Cvnt.daemon.plist
              [loaded] com.google.keystone.daemon.plist
              [loaded] com.microsoft.office.licensing.helper.plist
    Launch Agents:
              [loaded] com.Cvnt.start.plist
              [loaded] com.google.keystone.agent.plist
    User Launch Agents:
              [failed] com.apple.CSConfigDotMacCert-[redacted]@me.com-SharedServices.Agent.plist
    User Login Items:
              Flux
              iTunesHelper
              Bartender
              Caffeine
              Degrees
              Dropbox
              BetterSnapTool
              Covenant Eyes
              SkyDrive
              SlimBatteryMonitor
              Droplr
              Battery Health
              Spotdox
              handyPrintDaemon
              DeskConnect
              SecondBar
              Display Menu
              Battery Time Remaining
              Quicksand
              Flux
              CrossOver CD Helper
              AppTrap
    3rd Party Preference Panes:
              AppTrap
              Flash Player
              handyPrint
              Java
              Perian
    Internet Plug-ins:
              Flash Player.plugin
              FlashPlayer-10.6.plugin
              googletalkbrowserplugin.plugin
              iPhotoPhotocast.plugin
              JavaAppletPlugin.plugin
              npgtpo3dautoplugin.plugin
              o1dbrowserplugin.plugin
              QuickTime Plugin.plugin
              SharePointBrowserPlugin.plugin
    User Internet Plug-ins:
    Bad Fonts:
              None
    Top Processes by CPU:
                   7%          backupd
                   6%          WindowServer
                   2%          Finder
                   2%          SystemUIServer
                   1%          EtreCheck
                   1%          hidd
                   1%          mds
                   0%          Microsoft Word
                   0%          ps
                   0%          ocspd
    Top Processes by Memory:
              164 MB             HPScanner
              139 MB             WebProcess
              106 MB             mds
              106 MB             Mail
              90 MB              Dropbox
              90 MB              WindowServer
              82 MB              Microsoft Word
              74 MB              applet
              74 MB              Dock
              66 MB              DashboardClient
    Virtual Memory Statistics
              4.30 GB            Free RAM
              2.23 GB            Active RAM
              512 MB             Inactive RAM
              738 MB             Wired RAM
              876 MB             Page-ins
              0 B                Page-outs

  • SQL query return wrong Windows version

    when excuting   'select @@VERSION' returns wrong Windows version. Why?

    when excuting   'select @@VERSION' returns wrong Windows version. Why?
    SELECT @@VERSION will return SQLServer version and not windows version
    Even in case of sql, if you're seeing a different version from what your management studio suggests, then it may be that you're SSMS (client tool) is of another later version whereas the server instance which you're actually connecting to may
    be of different (earlier) version.
    Please Mark This As Answer if it solved your issue
    Please Vote This As Helpful if it helps to solve your issue
    Visakh
    My Wiki User Page
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • Exposé picks the wrong window

    Hi, I recently switched from a 20" G5 iMac (10.4) to a new 24" (Intel, 10.5). I was a big fan of Exposé, and I like to use the Mighty Mouse scroll wheel button to "show all" windows. I am finding that since the switch (not sure if it's the new machine, or the new system software - presumably the latter), that Exposé misbehaves. The scroll wheel button does indeed show all, but then when I select the window I want, about half the time, the wrong window is brought to the front. For example, I might show all, then mouse over the iTunes window, which is properly identified as such (by the little darkened box that says 'iTunes'), but then when I let go of the mouse button, some random window comes up. Is anyone else noticing this problem? Am I doing something wrong? Is it just a bug, that I can hope gets fixed in the next update? Any thoughts anyone has would be welcome.

    I should mention that the problem only occurs when the mouse button is used to show all. Using a hot corner, Exposé works every time. I suppose in the grand scheme of things, this isn't a massive problem - just a nuissance, since I've grown so accustomed to navigating my open windows in this way.

  • Focus on wrong window using spaces

    When I do the following:
    1. assign preview to space 4 in System preferences, spaces
    2. open some documents in Preview.
    3. switch to another space (say, space 1)
    4. open other documents (say, a bunch of pictures)
    I get the following behaviour:
    The finder switches automatically to space 4 (normal), and then, instead of my pictures appearing as the first window, they appear in a window behind some of the other documents already opened (in step 2).
    Isn't that weird?
    Now, when I continue by doing:
    5. Put the opened bunch of pictures in front.
    6. Close their window.
    7. Go back to space 1.
    8. Open the same bunch of pictures again.
    This time, the finder switches to space 4, and the pictures correctly appear in a window in front.
    If I start again with steps 1 to 4 but with a new set of pictures, they again appear behind some other document.
    Very weird.
    It looks like a bug and I guess there is no "solution" for the moment, but I wonder if this is common behaviour. Has anyone got the same behaviour?

    I have the same incorrect focus problem when opening a document in a Space different from the Space it’s assigned.
    For me it is mostly when I double-click on a website link in my e-mail application in Space 1 and my browser (Safari) is in Space 2. The web page I wanted to go to is behind a previously opened browser window. It’s more of an annoyance than a problem. Safari offsets new windows so the unfocused window is sticking out on the side from the focused window and I just click on it to have it become the focused window.
    I read on another posting that a user was running a beta of 10.5.3. Perhaps the problem will be resolved in that update if enough people report the bug to Apple. I’ve seen on this forum a link to send a message to Apple for recommending changes and new features. Guess I’ll need to go find it.

  • Xmonad and focus follows mouse issue

    I've been fiddling around with xmonad, and I notice that with focus follows mouse turned on, when I create a new window the window under the mouse gets selected instead of the window that I have just created. Pretty irritating, Anyone know how to solve that?
    Thanks for any help provided,
    Kruppe

    Yes, disabling the focus follows mouse behaviour makes it so the correct window is always chosen.
    I kind of like having focus follows mouse for when I need to copy and paste in applications that don't provide good methods for doing that purely with the keyboard (firefox and most terminals when not using screen). I would therefore like to have focus follows mouse.
    Sidenote: What is this updatePointer thing you use and what does it do?

  • How do I stop Firefox from claiming to have sessionrestore errors or opening the wrong session items and/or remember the wrong window size and/or position.

    Since automatically updating to version 25 Firefox is randomly opening recent tabs and windows from the browsing history, and/or randomly positioning the browser window from history.
    Currently using Firefox 25.0.1 on Windows Vista and Windows 7. Problems started immediately after automatic updates to 25.0.0. Problems are most noticeable on the Vista box because it has so much screen geography (the Windows 7 box is a laptop).
    Problems include:
    Firefox may open the correct tabs into a properly sized and positioned window, without problem. (Not a problem, included for completeness since it does, occasionally, work without error).
    Firefox open a single empty tab (about:blank, my Home page). (Listed as a problem because Firefox simply forgot the tab which was open.)
    Firefox may claim it cannot open the correct tabs and pop up about:sessionrestore. Proceeding will open all tabs (usually only one or two for me). This gives the impression Firefox did not actually have a problem. But, then, often, the tab Firefox is having problems restoring is about:blank so I should hope there was no problem!
    Firefox may open randomly selected recent browsing items, without other problems. This gives the impression that Firefox does not properly record recent history for about:sessionrestore. Checking History appears correct; Firefox simply reached back hours, or days, or even weeks, and restored a random session from long ago.
    Any of the above may occur, but the window position and/or size will be randomly selected from another recent history item. This is most noticeable when the position is on the wrong monitor and can be annoying since Firefox simply "disappears" if (as it often is for me) that other monitor is disconnected or powered off.

    If you use cleanup software like CCleaner then check the settings for the Firefox application.<br />
    Also make sure that your anti-virus software doesn't mess with files in the Firefox profile folder.
    *http://kb.mozillazine.org/Profile_folder_-_Firefox
    You can check for problems with the sessionstore.js and sessionstore.bak files in the Firefox profile folder that store session data.
    Delete the sessionstore.js file and possible sessionstore-##.js files with a number and sessionstore.bak in the Firefox profile folder.
    *Help > Troubleshooting Information > Profile Directory: Show Folder (Linux: Open Directory; Mac: Show in Finder)
    *http://kb.mozillazine.org/Profile_folder_-_Firefox
    *http://kb.mozillazine.org/Multiple_profile_files_created
    Deleting sessionstore.js will cause App Tabs and Tab Groups and open and closed (undo) tabs to get lost and you will have to recreate them (make a note or bookmark them if possible).

  • How do you disable OS X (when you focus on a window) from auto-focusing on windows from the same (or similar) program on another screen

    Hi,
    I have what is quickly becoming a major nuisance, I hope someone here knows more than me (hopefully about to change this behaviour..?).
    Whenever I click on e.g. excel on one screen, the excel windows in the background on my other screen is automatically brough to the front, hiding the window I actually want to be able to see. And if I have no excel windows on that screen, it will automatically bring e.g. MS word to the front instead.
    Does anyone know of a way to disable this extremely annoying behaviour? It seems silly to have to minimize every single window (yes, I have a lot open at any given time, and need to transfer data between several different programs) just to be able to look at windows from two different programs at the same time.
    Cheers,
    W

    this is NOT how apps behave on a Windows PC. There, the different windows of any app focus independently.
    Mmm, no, not really. All Windows apps run inside an application frame. Nothing for that app can exist outside the frame. Once you are in the frame of a given app, all of (example) Excel's open documents are also stuck inside the frame. Along with any palettes or other objects for that app. You can take it off full screen display like below, but each app, and everything associated with it is in its own frame.
    I mention this to show that you can do the same thing on your Mac. Where you said:
    I'm clicking/highlighting to the foreground (this also applies if I use alt+tab in Windows PC; you cycle through every single excel you have open,
    The equivalent on the Mac is to press Command+` (same key as the tilde ~, which should be directly above the Tab key). So it's Command+Tab to switch between apps, and Command+` to rotate between open documents within an app.
    So anyway, in the same manner you would arrange your Windows apps as shown above so you can see the contents of both apps, you simply arrange your Mac apps' documents the same way. Adjust the size of each open document as necessary so you can see the relevant information.
    Just like if a person were going from Mac to Windows, it's "different". Folders, files and apps? All the same concept. Saving and deleting files? Pretty much the same. But if you're very used to one, the other seems odd until the need to think about "simple" steps that aren't performed quite the same way as the OS you're used to becomes habit, and it no longer seems odd anymore.

  • Change and set Focus of window

    HI
    Guys
    I have encountered a problem while setting focus of my application's windows.
    i found the way i.e. by
    public void windowGainedFocus(WindowEvent wgf) {          
              if(this.isActive()){
                   VWM.theVWMDetailWindow.setAlwaysOnTop(true);
                   System.out.println(wgf.getSource());
         }by doing that there is errors came.....
    but there is no effect on the window theVWMDetailWindow to have operation setAlwaysOnTop successfully functoned
    Please help me out
    Thanks

    HI
    Yannix
    actually , i want to get the focus of my application window
    and then perform the action on it..
    The case is that::
    I have a main window..then on it a menu bar...
    when i click on one of the menu option then another separate window will be opened....and many other windows on different menu options....
    SO now i want to control their focus..... rite
    when my main window's focus lost means if i select another application
    another related opened window's must also lost their focus at that time.and when i came back to the main window another window's already opened must be on top.....
    So could you please suggest me some way , some solution to solve this
    Thanks

  • System.exit(0) closes wrong window

    I use a web browser to display an applet.
    In the applet I have the possibility to start a new webbrowser window with myapplet.getAppletContext().showDocument(url, "_blank");In the new webpage I also start a new applet.
    To close this new web page I call System.exit(0); from the applet in the new page.
    The strang thing that happens than is that the parent window is closed and the newly opened web page is still active.
    If I open these windows myself in the browser, I can close them from the applet.
    Can anybody help.

    System.exit is not permitted by an applet for the above mentioned reason.
    Multiple browser windows with applets share the same jvm so exiting the
    jvm makes the other applets crash.
    When you give the applet permission (sign or policy) system.exit will crash
    the browser.
    It is possible to close a popup window, since I don't beleve in the JSObject
    anymore (crashed too many times with too many bugs in mozilla).
    You can use another way, here it is.
    in your applet// to open the window
    this.getAppletContext().showDocument(
         new URL("javascript: myPopupWindow = window.open('yourPage.htm');myPopupWindow.focus()"));
    // to close the window
    this.getAppletContext().showDocument(
         new URL("javascript: myPopupWindow.close()"));in your html page:<script>
    var myPopupWindow = null;
    </script>

  • Focusing a window and removing from app bar

    I am using snoozesoft systray4j to have my application have a systemtray icon.
    I want that when I minimize the application it goes away from the application bar and when I click on a button on the systemtray it focus the entire window.
    So I would like to know if is possible to remove (and the add again) the application from the app bar...
    About the focusing I am talking of the complete window focus, is it possible?

    You're welcome. Glad I could help.
    Thanks for the and Aloha from Big Island.
    iMac G5 Rev C 20" 2.5gb RAM 250 gb HD/iBook G4 1.33 ghz 1.5gb RAM 40 gb HD   Mac OS X (10.4.8)   LaCie 160gb d2 HD Canon i960 printer

  • How to determine which application has focus in Windows

    Hello all-
    I'm trying to work around the "Labview freezes when there is large data on the clipboard known issue" (http://forums.ni.com/t5/LabVIEW/Labview-freeze-when-accessing-a-custom-menu-with-data-on-the/m-p/200...) and one thought is to try to determine if Labview has focus, and if it does then clear the clipboard.  If Labview doesn't have focus, then let the user use the clipboard.  This would be a good work-around because it would let the users paste screen shots and such into notes files and wouldn't risk a nasty clipboard/ menu/ freeze-crash.
    My initial search for determining windows application focus, came up empty though.  This old thread (from 2005) pretty much covers it:
    http://forums.ni.com/t5/LabVIEW/Is-there-a-simple-way-to-programatically-tell-which-VI-window/m-p/20...
    The "Is Frontmost' property does not do it.  I need to determine if Labview has focus, as opposed to Windows, notepad, firefox, etc.  I also reviewed the commad prompt commands and didn't find anything immediately helpful there either.
    Any ideas?
    Thanks,
    Casey
    Solved!
    Go to Solution.

    Christian-
    That's perfect!  By using GetForegroundWindow, GetWindowTextA and GetWindowFileNameA in user32.dll I can detect which window has focus.  If Labview has focus then I programatically clear the clipboard so the user can still use it when not clicking on Labview windowns, but also we do not risk a freeze and crash because of the clipboard/ freeze bug.
    I briefly thought about using the .NET versions of these functions, but because that would have forced an upgrade to at least .NET framework 3.0 for all of my user computers, I decided on the unmanaged user32.dll.
    Thanks for the suggestion.  I think I'm pretty close to a work around here that should last me until they fix the clipboard/ freeze bug.
    Thanks,
    Casey

  • Focus-Grabbing Window

    Hi,
    I have an SDK 7.0.5 plug-in that displays PDFs in my own C# window through COM.  When I call AVDocOpenFromASFileWithParams, the control I used to select the file loses focus.  After the PDF finishes loading (which can obviously take a while if the file is large), focus is returned to my control.  Is there a single-threaded way I can prevent the control from ever losing focus?
    Thanks,
    Daniel Sheiner

    We create the "hidden window" as follows in C#:
         System.Diagnostics.ProcessStartInfo startInfo = new System.Diagnostics.ProcessStartInfo();
         startInfo.CreateNoWindow = true;
         startInfo.FileName = path;
         startInfo.Arguments = "/n";
         startInfo.WindowStyle = ProcessWindowStyle.Minimized;
         _acrobat = System.Diagnostics.Process.Start(startInfo);
        NativeMethods.ShowWindow(_acrobat.MainWindowHandle, 0);
    where path is the path to Acrobat.exe, and NativeMethods.ShowWindow is defined via DllImport from User32.dll.
    Through COM, we pass our plug in the handle for our browser.  We open the PDF with AVDocOpenFromASFileWithParams.  The AVDocOpenParams we pass in has its serverCreationData set to an ExternalDocServerCreationData with its platformWindow set to the handle for our browser.

  • Xmonad: Changing focus while in a fullscreen game

    It seems my modkey is disabled while in fullscreen games.  A good example would be Cube2.  While in fullscreen I can't change to a different workspace; I must totally exit the game.  In Windows I'm able to alt-tab in and out of running games without issue.  Is there a way to achieve comparable behavior in Xmonad?

    Oh man that sure stinks!  There isn't a whole lot of reason to game on Linux if you lose access to your desktop when you're in a game; might as well reboot to Windows.
    I've attempted this with multiple native Steam games and every one, without exception, locks me from my desktop.  With a short test, I can't find a single example of a game that allows me to "ALT-Tab" back to my desktop.  I've been really excited by the arrival of Steam on Linux but if I'm unable to switch from a game to a chat window and back, why bother?

  • Spaces bringing wrong windows to front

    Hello.
    I love using multiple spaces when I work. This is one of the reasons that brought me to Mac.
    But, there is an issue which I encounter since the beginning and which I can't stand anymore: often, when I come back to a space, the windows order is changed.
    For example: I have one space with xCode IDE, xCode Documentation (which is actually the same application), and the iPhone Simulator. In an other space, I have iTunes, Skype and all stuff which are not related to work. When I switch to iTunes, then switch back to xCode, very often, the Documentation and the iPhone simulator, which were behind, come up to the front.
    This happen 90% of the time, and is really annoying when you use spaces a lot.
    Is this a normal behavior? Am I doing something wrong? Is this a bug? Could I fix it?
    I'm running OSX 10.6.7, but this happen since the beginning.
    Thanks.

    I am having the exact issue on two separate machines. Would love to know if someone else has a fix for this. Thanks!

Maybe you are looking for

  • Apple id password not accepted on icloud

    why is my apple id password not accepted when I try to login to iCloud? The same password worked when I tried to login to support to post this question!

  • How can i retrieve my old text messages?

    I synced my iphone 5s to the computer for the first time and all my personal data was wiped such as text messages, photos, emails and contacts they were then replaced with my dads information? How do i get my stuff back?

  • How can I make my ipad recognize the change of Apple id?

    icloud does not recognize my new Apple id. ipad 3

  • One purchase Organization going to Purchase

    For a certain purchase organization For purchasing PRODUCT-1, Purchase Order calculation schema C1 consists of (MRP, DISCOUNT) PRODUCT-2, Purchase Order calculation schema C2 consists of (MRP, DISCOUNT, and EXSISE DUTY) PRODUCT-3, Purchase Order calc

  • Weblogic server 7.0 security

    When I start the server (it is a admin managed server in a domain), I got this message: [java] <Oct 16, 2002 11:47:44 AM CDT> <Error> <Security> <090158> <The Server was unable to find the private key with alias demokey at location wlDefaultKeyStore.