[fixed] - tray icon restores to wrong monitor

Discussion in '1.8.0 Pre Release' started by jimekus, May 28, 2014.

  1. jimekus

    jimekus Portal Member

    Joined:
    July 13, 2012
    Messages:
    19
    Likes Received:
    1
    Gender:
    Male
    Ratings:
    +3 / 2
    Home Country:
    New Zealand New Zealand
    I have three monitors where (1) is my MP movie Samsung TV, (2) is my 22" Benq computer monitor and (3) is an old CRT that I occasionally use for physics experiments. After MP is closed to the tray and then later restored it now comes back up on monitor 3 everytime. I have to use Alt+Enter to be able to use Ultramon to send it back to monitor 1. This computer is an Asus F2A85M-M with an AMD A6-5400K APU and 8gb of Ram.


     
    Last edited: May 28, 2014
  2. Google AdSense Guest Advertisement



    to hide all adverts.
  3. elliottmc
    • Team MediaPortal

    elliottmc Retired Team Member

    Joined:
    August 7, 2005
    Messages:
    14,927
    Likes Received:
    4,011
    Gender:
    Male
    Location:
    Cardiff, UK
    Ratings:
    +5,503 / 13
    Home Country:
    United Kingdom United Kingdom
    Show System Specs
  4. jimekus

    jimekus Portal Member

    Joined:
    July 13, 2012
    Messages:
    19
    Likes Received:
    1
    Gender:
    Male
    Ratings:
    +3 / 2
    Home Country:
    New Zealand New Zealand
    MediaPortal.log is 584kb
     
  5. elliottmc
    • Team MediaPortal

    elliottmc Retired Team Member

    Joined:
    August 7, 2005
    Messages:
    14,927
    Likes Received:
    4,011
    Gender:
    Male
    Location:
    Cardiff, UK
    Ratings:
    +5,503 / 13
    Home Country:
    United Kingdom United Kingdom
    Show System Specs
    It would probably best if you can make a shorter log that shows the problem without all of the extra stuff. Use the log collector - start MediaPortal Debug-Mode from the start menu. There are explanations in the forum and documentation.
     
  6. jimekus

    jimekus Portal Member

    Joined:
    July 13, 2012
    Messages:
    19
    Likes Received:
    1
    Gender:
    Male
    Ratings:
    +3 / 2
    Home Country:
    New Zealand New Zealand
    FWIW, after a clean Win7x64 install and a clean install of MP 1.8 without restoring my backup, the problem is still there. I uninstalled 1.8 and put on 1.7.1 and the problem is also still there. I hope these logs help.
     
  7. mm1352000
    • Team MediaPortal

    mm1352000 Development Group

    Joined:
    September 1, 2008
    Messages:
    21,518
    Likes Received:
    4,730
    Ratings:
    +8,196 / 17
    Home Country:
    New Zealand New Zealand
    Sorry, those logs are no good. Literally the only thing in the MP log is:
    [2014-06-08 15:18:27,725] [Log ] [MPMain ] [WARN ] - Main: MediaPortal is already running

    If you didn't previously, please use the watchdog/debug-mode option 1 to start MP and reproduce the problem.

    If you tried option 1 and this is what you got, please manually set log verbosity to debug (http://wiki.team-mediaportal.com/1_...ion/00_Configuration/11_General#Log_verbosity), reproduce the problem, then use the watchdog to export the logs with option 3.
     
  8. jimekus

    jimekus Portal Member

    Joined:
    July 13, 2012
    Messages:
    19
    Likes Received:
    1
    Gender:
    Male
    Ratings:
    +3 / 2
    Home Country:
    New Zealand New Zealand
    sorry. I hope these help.
     
  9. mm1352000
    • Team MediaPortal

    mm1352000 Development Group

    Joined:
    September 1, 2008
    Messages:
    21,518
    Likes Received:
    4,730
    Ratings:
    +8,196 / 17
    Home Country:
    New Zealand New Zealand
    Yep, that's much more helpful (y)

    This is what I see:
    Show Spoiler
    [2014-06-08 15:40:28,843] [Log ] [MPMain ] [INFO ] - D3D: Restoring from tray
    [2014-06-08 15:40:28,844] [Log ] [MPMain ] [DEBUG] - Main: WM_GETMINMAXINFO Start (MaxSize: 1280x720 - MaxPostion: 0,0 - MinTrackSize: 2x2 - MaxTrackSize: 3852x780)
    [2014-06-08 15:40:28,845] [Log ] [MPMain ] [DEBUG] - Main: WM_GETMINMAXINFO End (MaxSize: 1280x720 - MaxPostion: 0,0 - MinTrackSize: 1280x720 - MaxTrackSize: 1280x720)
    [2014-06-08 15:40:28,855] [Log ] [MPMain ] [DEBUG] - Main: WM_ACTIVATE (WA_ACTIVE)
    [2014-06-08 15:40:28,855] [Log ] [MPMain ] [INFO ] - Main: Activation request received
    [2014-06-08 15:40:28,857] [Log ] [MPMain ] [DEBUG] - Main: WM_SIZE (SIZE_MINIMIZED: 0x0)
    [2014-06-08 15:40:28,868] [Log ] [MPMain ] [DEBUG] - Main: WM_GETMINMAXINFO Start (MaxSize: 1280x720 - MaxPostion: 0,0 - MinTrackSize: 2x2 - MaxTrackSize: 3852x780)
    [2014-06-08 15:40:28,870] [Log ] [MPMain ] [INFO ] - Main: Screen MP OnGetMinMaxInfo is displayed on changed from \\.\DISPLAY1 to \\.\DISPLAY3
    [2014-06-08 15:40:28,871] [Log ] [MPMain ] [INFO ] - Main: OnGetMinMaxInfo Bounds of display changed from 1280x720 @ 1280,0 to 1280x768 @ -1280,0
    [2014-06-08 15:40:28,872] [Log ] [MPMain ] [DEBUG] - Main: Screen MP OnGetMinMaxInfo Information.DeviceName Manager.Adapters \\.\DISPLAY1
    [2014-06-08 15:40:28,873] [Log ] [MPMain ] [DEBUG] - Main: Screen MP OnGetMinMaxInfo current screen detected \\.\DISPLAY3
    [2014-06-08 15:40:28,873] [Log ] [MPMain ] [DEBUG] - Main: Screen MP OnGetMinMaxInfo current screen \\.\DISPLAY1
    [2014-06-08 15:40:28,874] [Log ] [MPMain ] [DEBUG] - Main: Screen MP OnGetMinMaxInfo start screen \\.\DISPLAY1
    [2014-06-08 15:40:28,875] [Log ] [MPMain ] [DEBUG] - Main: Screen MP OnGetMinMaxInfo change current screen \\.\DISPLAY1 with current detected screen \\.\DISPLAY3
    [2014-06-08 15:40:28,877] [Log ] [MPMain ] [DEBUG] - Main: Screen MP OnGetMinMaxInfo set current screen bounds {X=-1280,Y=0,Width=1280,Height=768} to Bounds {X=-32000,Y=-32000,Width=160,Height=27}
    [2014-06-08 15:40:28,878] [Log ] [MPMain ] [DEBUG] - Main: WM_GETMINMAXINFO Start (MaxSize: 1280x720 - MaxPostion: 0,0 - MinTrackSize: 2x2 - MaxTrackSize: 3852x780)
    [2014-06-08 15:40:28,881] [Log ] [MPMain ] [DEBUG] - Main: Screen MP OnGetMinMaxInfo (changeScreen) change current screen \\.\DISPLAY3 with current detected screen \\.\DISPLAY3
    [2014-06-08 15:40:28,882] [Log ] [MPMain ] [DEBUG] - Main: WM_GETMINMAXINFO End (MaxSize: 1280x720 - MaxPostion: 0,0 - MinTrackSize: 1280x768 - MaxTrackSize: 1280x768)
    [2014-06-08 15:40:28,885] [Log ] [MPMain ] [DEBUG] - Main: WM_SIZE (SIZE_RESTORED: 1280x768)
    [2014-06-08 15:40:28,886] [Log ] [MPMain ] [DEBUG] - Main: Screen MP OnGetMinMaxInfo recreate swap chain
    [2014-06-08 15:40:28,888] [Log ] [MPMain ] [DEBUG] - Main: RecreateSwapChain()


    So MP certainly knows it is changing screen.

    I think the reason for the screen change is that MP is being restored from a different screen than the one you want it to run on. Can you confirm?
     
  10. jimekus

    jimekus Portal Member

    Joined:
    July 13, 2012
    Messages:
    19
    Likes Received:
    1
    Gender:
    Male
    Ratings:
    +3 / 2
    Home Country:
    New Zealand New Zealand
    That's right. MP launches to monitor 1 and monitor 2 is my primary monitor where the system tray is. Monitor 3 is where MP restores to. I don't know when this behavior started but I hope you can fix it.
     
  11. mm1352000
    • Team MediaPortal

    mm1352000 Development Group

    Joined:
    September 1, 2008
    Messages:
    21,518
    Likes Received:
    4,730
    Ratings:
    +8,196 / 17
    Home Country:
    New Zealand New Zealand
    My pick would be MP 1.4.

    I'm not sure that I personally can fix it - I'm no expert with D3D. Just trying to collect all the information about what is actually going on.

    The screen is changed on receipt of one of these messages from Windows:
    http://msdn.microsoft.com/en-us/library/windows/desktop/ms632626(v=vs.85).aspx

    As the link says, the message means a window is about to change size or position. It seems reasonable to infer that a change in position could infer a change in screen.

    The thing that doesn't make sense to me is that MP is receiving two of these messages in quick succession. Why Windows would send two I don't know.

    The first message has no meaningful effect:
    [2014-06-08 15:40:28,844] [Log ] [MPMain ] [DEBUG] - Main: WM_GETMINMAXINFO Start (MaxSize: 1280x720 - MaxPostion: 0,0 - MinTrackSize: 2x2 - MaxTrackSize: 3852x780)
    [2014-06-08 15:40:28,845] [Log ] [MPMain ] [DEBUG] - Main: WM_GETMINMAXINFO End (MaxSize: 1280x720 - MaxPostion: 0,0 - MinTrackSize: 1280x720 - MaxTrackSize: 1280x720)

    Interestingly that means MP thinks it is running on screen 1 at that time, because it doesn't attempt to change screen.

    The second message triggers the screen change stuff based on this single line of code:
    Code (Text):
    1. Screen screen = Screen.FromControl(this);
    In plain English I would read that as "which screen am I actually running on?". The response is "screen 3"... which is different to the previous "screen 1" answer, so then starts the screen change process.

    I don't see anything obviously wrong with the code or logic. Clearly the result is not what you want, but I don't think it would be right to just remove that "which screen am I actually running on" check.
     
    • Thank You! Thank You! x 1
Loading...

Users Viewing Thread (Users: 0, Guests: 0)

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice
  • About The Project

    The vision of the MediaPortal project is to create a free open source media centre application, which supports all advanced media centre functions, and is accessible to all Windows users.

    In reaching this goal we are working every day to make sure our software is one of the best.

             

  • Support MediaPortal!

    The team works very hard to make sure the community is running the best HTPC-software. We give away MediaPortal for free but hosting and software is not for us.

    Care to support our work with a few bucks? We'd really appreciate it!