NO

Author Topic: PellesC 4.0 - right click popup menu with dual monitor deskt  (Read 6302 times)

tiwag

  • Guest
PellesC 4.0 - right click popup menu with dual monitor deskt
« on: August 24, 2005, 08:40:09 AM »
on my devel machine i use a dual monitor desktop

when Poide is on the primary monitor displayed, the right-click popup-menu (rpopmenu) is displayed (as expected) with it's left upper corner at the current cursor position.

when Poide is on the secondary monitor displayed, the rpopmenu is displayed at the height of the current cursor position, but on most left side of the primary monitor  :?

this is not a videocard-driver issue, because all other windows apps show their rpopupmenu's on the right place, regardless of which monitor is actually used for displaying.


my dual monitor configuration:

Code: [Select]

                     2                                                   1
                   left                                                right
            (secondary monitor)                                   (primary monitor)




maybe it looks weird at the first moment, but i often run a VMare PC emulation box with linux or some test-os in fullscreen mode -
then Vmware displays in full screen on the right monitor (1),
while i have my windows XP with tasbar and everything on the left monitor (2).

Offline Pelle

  • Administrator
  • Member
  • *****
  • Posts: 2266
    • http://www.smorgasbordet.com
PellesC 4.0 - right click popup menu with dual monitor deskt
« Reply #1 on: August 24, 2005, 02:42:26 PM »
I don't have a dual monitor setup to test with, but I assume it's because there is a bug in Microsoft's windowsx.h.

The coordinates in HANDLE_WM_CONTEXTMENU are treated as unsigned - which seem to be consistent with older API documentation. I recent documentation the coordinates are suddenly signed(!) - as far as I can tell a rather silent, but very important, change!  :evil:

The x- and y-coordinates are packed into the LPARAM, so they must be extracted carefully - for example 65535 is not the same as -1!

Pelle
/Pelle

tiwag

  • Guest
PellesC 4.0 - right click popup menu with dual monitor deskt
« Reply #2 on: August 24, 2005, 04:13:31 PM »
no problem- if you want to have a test on a dual monitor desktop - just drop me a message :)

Offline Pelle

  • Administrator
  • Member
  • *****
  • Posts: 2266
    • http://www.smorgasbordet.com
PellesC 4.0 - right click popup menu with dual monitor deskt
« Reply #3 on: August 24, 2005, 04:35:49 PM »
If you have time, you can test with the attached version. I have modified the macro in windowsx.h and recompiled the IDE. I have also added support for Shift+F10.

Pelle
/Pelle

tiwag

  • Guest
PellesC 4.0 - right click popup menu with dual monitor deskt
« Reply #4 on: August 24, 2005, 06:11:48 PM »
Quote from: "Pelle"
If you have time, you can test with the attached version...

Hi Pelle , now it works as expected !
thanks
tiwag

Offline Pelle

  • Administrator
  • Member
  • *****
  • Posts: 2266
    • http://www.smorgasbordet.com
PellesC 4.0 - right click popup menu with dual monitor deskt
« Reply #5 on: August 25, 2005, 12:48:20 AM »
Quote from: "tiwag"

Hi Pelle , now it works as expected !
thanks
tiwag

Very good - thanks for the info!

Pelle
/Pelle

tiwag

  • Guest
PellesC 4.0 - right click popup menu with dual monitor deskt
« Reply #6 on: August 25, 2005, 08:14:18 AM »
Hi Pelle,
i found another bug related (probably) to the same subject.

The screen-coordinates of PoIDE are not recovered correctly after closing.
If PoIDE was displayed in any negative coordinates area of the desktop,
it always restores to quadrant 1 (x>0, y>0).

Offline Pelle

  • Administrator
  • Member
  • *****
  • Posts: 2266
    • http://www.smorgasbordet.com
PellesC 4.0 - right click popup menu with dual monitor deskt
« Reply #7 on: August 25, 2005, 07:55:53 PM »
Quote from: "tiwag"

i found another bug related (probably) to the same subject.

The screen-coordinates of PoIDE are not recovered correctly after closing.
If PoIDE was displayed in any negative coordinates area of the desktop,
it always restores to quadrant 1 (x>0, y>0).

Hello,

The window is most likely limited to the main monitor. Not strictly a bug.

Supporting multiple monitors means small changes in several places. Few people will probably ever use this feature, so it has very low priority. Changing the context menu was needed for other reasons too, but I will not do more about multiple monitors for now.

Pelle
/Pelle

tiwag

  • Guest
PellesC 4.0 - right click popup menu with dual monitor deskt
« Reply #8 on: August 25, 2005, 09:40:18 PM »
Quote from: "Pelle"

... Few people will probably ever use this feature...
Don't fool yourself  :|

Quote from: "Pelle"
...but I will not do more about multiple monitors for now.
 OK :shock:

thanks tiwag