There’s been a very interesting and productive exchange of comments on my previous TopDesk post. James Stewart of Otaku Software, the developers of TopDesk, pulled me up on some of my comments (given I was a bit unfair), so I explained myself. See the post comments for full details.

The result of which is that I’m trying it again. This time though with the spatial and grid modes since thats where the increase in speed is. James also explained that the memory usage is down to a combination of DirectX and video card drivers. It’s also worth noting that some of the memory usage will be on the video card.

So I shall report back later on my progress.

By Paul

10 thought on “TopDesk Continued”
  1. Actually, I have noticed one problem. If a program has a showmodal popup (i.e. like in BlogJet for the “Insert Hyper Link” option) which currently has focus it can’t seem to focus on it.

    The modal window doesn’t appear to be in the list of windows, just the main application window. If I select it, the main application window is now active but I can’t do anything since the modal window is open (and hidden behind the main window).

    The only way to get round it is to go back to the windows Alt+Tab which seems to focus on the application correctly.

  2. I’m afraid the problem you’re seeing isn’t TopDesk, it’s architectural. That’s one of the issues with implementing this type of functionality in Windows XP – the system wasn’t designed for it, so there’s always going to be minor flaws.

    I’m not going to pretend TopDesk is perfect, but I think it’s as good as it can be given the limitations of XP, and it’s probably as close as you’re going to get to these kind of features in a current Windows OS.

  3. Fair enough, but in the situation I’ve described it is easy to get round it. For whatever reason the showmodal dialog of BlogJet does not appear in the list of applications. If it did, there would be no problem.

    To prove I wasn’t going mad, I’ve written a test program in Delphi that gets a list of all visible windows and has the ability to set focus. It contains a class that encapsulates “EnumWindows” that pulls back all the necessary info. I don’t know what logic you use to decide what windows to display, but the list in my test program isn’t far off.

    Its downloadable here:

    If its not any use, then you can tell me where to stick it, I’ll not be offended :). I’m not being a pain for the fun of it, you’ve got a great app here, I’m just trying to be helpful.

  4. […] I’ve realised the power of blogs from a first hand perspective. I didn’t expect feedback about TopDesk, but that serves me right for leaving a pingback on Scott Hanselman’s blog (it wasn’t me, it was WordPress!). I am interested to see where it leads though, I’ve left some further comments and not gotten a reply (yet). […]

  5. Hi Paul,

    Sorry for the delay, I’ve been busy with the release of BoxingClever, the next Otaku Software application.

    Enumerating the window isn’t the issue, the problem is that TopDesk only deals with application windows, and the BlogJet modal dialog isn’t actually an application window. It’s a two-edged sword: I can either loosen up what’s considered an application window, which will solve some problems but introduce others, or I can go with the “official” application window rules.

    With TopDesk I’ve gone for something in the middle. If a major application (say Word, for example) breaks the rules, then TopDesk will accommodate it. Smaller applications are left to “get with the program” and follow the rules.

  6. James,

    I have to say I’m stunned at what you’ve just said. I will admit BlogJet is hardly a main stream application, but I would consider FeedDemon to be (e.g. Scott Hanselman uses it) and it is also affected by the problem.

    Alt+Tab is capable of focusing properly and given that TopDesk is meant to be an Alt+Tab replacement, I would like to think it would match its functionality. I’m not being silly but a showmodal popup is a very standard part of a Windows application.

    I’ve done some further research and updated my original test program to list just the application windows. With this I am now able to set focus to programs such as FeedDemon and BlogJet when they have showmodal windows open, and it focuses properly. I think its down to the handle TopDesk is using to focus on an application with. Simple as that.

    I’m only trying to be helpful here, so please take a look. The only changes I’ve made over the previous program are in WindowList.pas, lines 65-68.

    Its downloadable here:

    Actually, here is the logic I use to decide what windows to keep (its within the EnumWindows callback):

    if (IsWindowVisible(WHandle)) and
    ((GetWindowLong(WHandle, GWL_HWNDPARENT) = 0) or
    (GetWindowLong(WHandle, GWL_HWNDPARENT) = GetDesktopWindow)) and
    (GetWindowLong(WHandle, GWL_EXSTYLE) and WS_EX_TOOLWINDOW = 0) then
    … Store window details

  7. Hi Paul,

    I don’t think anything I’ve said is “stunning”. I’m not knocking BlogJet or FeedBurner, they’re great apps, but please understand that there’s *thousands* of applications out there that could be considered mainstream by certain groups of users. We’re not Microsoft, we can’t throw an infinite amount of resources at the problem, so it’s simply impossible to deal with all the individual quirks of each application.

    Having said that, if enough users ask for a misbehaving application to be made compatible, we’ll try our best to accommodate them. It’s unfortunate that every incompatible application out there can’t be fixed, but it’s the reality of the situation.

    You’re right, it’s down to the window handle TopDesk uses to focus the application with, but the TopDesk application window detection code is a bit different than yours, and doesn’t think that the modal window is an application window. That’s the source of the issue, and that’s what I was trying to explain in the above posts.

    I’m not trying to pass the buck or have a go at BlogJet in anyway, it’s just that TopDesk has a more rigid interpretation of what an application window is. If enough people (around 5 :)) ask for TopDesk to be made compatible with BlogJet and/or FeedBurner I’d be happy to accommodate their request in a future version of TopDesk. As it is, we’re a small company and there’s only 24 hours in the day, so the unfortunate reality is that we have to prioritize our time (please remember that a fix doesn’t just involve changing some code: there’s testing, testing, and more testing, documentation, etc…).

  8. Hi James,

    I can totally empathise with you about the resources of a small company. I work at one (just the 5 of us) and I also program for a living so I do know what a program fix is and what’s involved. The actual code change is just one part of the process.

    The point I was trying to make was that to my mind there isn’t a great deal of code involved in getting the window list in the first place. The example program took less than half an hour to knock up and could be implemented as alternate method of working, if compatibility problems were an issue. Also given the time it’s taken you and I to comment something could probably have been done to fix it.

    Anyway, I think we’ve hit an impasse here. In the meantime I’ll go round up 5 people :). Thanks for taking the time to comment.

  9. Hi Paul,

    Thanks for understanding :). My only comment regarding the window list code is that using your code as-is you’d run into a lot of of compatibility issues. TopDesk already has a lot of workarounds for various window types and applications (the window list code is around 1000 lines itself), and it’s very “delicate” (change one thing to fix one application, affect “x” other applications), so it’s not necessarily a 30 minute job to add an alternate method in :).

    Round up some people, have them email me, and I’ll schedule some time to add the workaround in :).

  10. […] Telling me that these applications are “broken” is absolutely, positively, f**king stupid. (I was more polite in my comments, but I’ve spoken to other people about this and they couldn’t believe the reply I got). The way I see it, TopDesk is an Alt+Tab replacement. The first thing I would have done is to make sure it completely emulated Alt+Tab’s functionality. It doesn’t. […]

Leave a Reply

Your email address will not be published. Required fields are marked *