Menu

#128 xwindows on all Virtual Dimension Desktops

open
nobody
None
5
2012-07-18
2012-07-18
Anonymous
No

I'm using virtual dimension and cygwin for quite some many years now with (used to be) no issue. During an upgrade of my machine I also installed the most current version of cygein and its x-server. Since this time an xterm (or any other window) will show up on all my virtual dimension desktops as if it was attributed to "All desktops"
Worse: Virtual Desktop does not show any xterm-icons, as if it does never realize that these windows are there. This might be the reason why the xterms are visible on all desktops. But all of this used to work with older version of cygwin - I verified by going back to an older backup for testing.

A websearch of this always leads be to this former "redraw window issue". I would need to know (thanks for help) what the cause for this could be. I would need to know some buzzwords where I could start following and solving the problem. At this point I have no idea where to start of from (where to start reading).

Regards,
Frank

Discussion

  • Eberhard Kümmerle

    Hi,

    I had the same problem with cygwin.
    The reason is that opening a x-Window does not produce a ShellHook::WINDOWCREATED message, for whatever reason...
    I fixed it in VirtualDimension with the following patch:

    --- a/WindowsManager.cpp
    +++ b/WindowsManager.cpp
    @@ -122,6 +122,11 @@ Window* WindowsManager::GetWindow(HWND hWnd)

    LRESULT WindowsManager::OnShellHookMessage(HWND /*hWnd*/, UINT /*message*/, WPARAM wParam, LPARAM lParam)
    {
    + HWNDMapIterator it = m_HWNDMap.find((HWND)lParam);
    + if (it == m_HWNDMap.end()) {
    + OnWindowCreated((HWND)lParam);
    + }
    +
    switch(wParam)
    {
    case ShellHook::RUDEAPPACTIVATEED: OnWindowActivated((HWND)lParam); break;

    Regards,
    Eberhard

     
  • Eberhard Kümmerle

    Hi,

    because some other applications did not work properly with my former patch, I changed it as follows:

    ---------------

    --- a/WindowsManager.cpp
    +++ b/WindowsManager.cpp
    @@ -122,6 +122,15 @@ Window* WindowsManager::GetWindow(HWND hWnd)

    LRESULT WindowsManager::OnShellHookMessage(HWND /*hWnd*/, UINT /*message*/, WPARAM wParam, LPARAM lParam)
    {
    + HWNDMapIterator it = m_HWNDMap.find((HWND)lParam);
    + TCHAR className[30];
    + if ((it == m_HWNDMap.end()) &&
    + (wParam != ShellHook::WINDOWCREATED) &&
    + GetClassName((HWND)lParam, className, sizeof(className)/sizeof(TCHAR)) &&
    + !strcmp("cygwin/x X rl", className)) {
    + OnWindowCreated((HWND)lParam);
    + }
    +
    switch(wParam)
    {
    case ShellHook::RUDEAPPACTIVATEED: OnWindowActivated((HWND)lParam); break;

    ---------------

    It's really ugly that I had to hard code a special treatment for "cygwin/x X rl" windows but it works for me and perhaps, the maintainer of VirtDimension will find a better solution...

    Regards,
    Eberhard

     

Log in to post a comment.

Monday.com Logo