On Thu, Jul 28, 2011 at 12:16, Dmitry <wipedout_at_yandex.ru> wrote:
> Hey.
>
>> > A dialog asking whether I want to delete a file with
>> > local modification appears underneath the dialog window so that I
>> > can't see that confirmation dialog until I drag the "open file"
>> > dialog to the side.
>> That appears to be a bug in VS2008. Because TSVN shows all dialogs with
>> the window handle specified by the shell extension as its parent.
>> That's the window handle TSVN uses as the parent window to show the
>> dialog, as mentioned in the docs. But VS2008 actually passes the main
>> window here, not the file-open window!
>>
>> Nothing I can do to work around this, at least not without breaking apps
>> that pass the correct window handle.
> Maybe the following strategy could be used: call GetFocus(), then check that the returned windows macthes ot is a descendant of the one specified by the caller and if those two conditions are met use the one returned by GetFocus(). I mean it's the windows which spawned the context menu - it will likely have keyboard focus. Will this help?
No, won't help:
GetFocus() will return the window handle of the context menu if we're
lucky. But if we're not, GetFocus() can return any window. Because:
when we get to the part where the context menu invokes our command,
the context menu window could already be destroyed - that depends on
the implementation.
So: if it's the context menu that has the focus, we'd have to use its parent.
But what if the focus already shifted back to the open-dialog because
the context menu window was already destroyed? Then we'd have to use
the window that GetFocus() returned. The parent window of that would
be the VS2008 main window - so we're right were we started.
Also I've seen very strange things with GetFocus() when screen readers
or themeing-engines were installed - focus was all over the place just
not where I'd expect. So I don't like the idea of using the focused
window for this.
Stefan
--
___
oo // \\ "De Chelonian Mobile"
(_,\/ \_/ \ TortoiseSVN
\ \_/_\_/> The coolest Interface to (Sub)Version Control
/_/ \_\ http://tortoisesvn.net
------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=757&dsMessageId=2805268
To unsubscribe from this discussion, e-mail: [dev-unsubscribe_at_tortoisesvn.tigris.org].
Received on 2011-07-28 13:38:14 CEST