telegramdesktop / tdesktop

Telegram Desktop messaging app
https://desktop.telegram.org/
Other
26.16k stars 5.19k forks source link

Context / Right-Click Menu Opens in Wrong Display / dual gfx / amd #7099

Closed antoniscy closed 2 years ago

antoniscy commented 4 years ago

I usually keep my Telegram Desktop window on my secondary monitor (I've got 3). Sometime along the 1.9.x versions the context menu started appearing on the primary display only.

If i move the app on the primary display, right-click menu works as expected. When it goes back in its normal position on the 2nd monitor then context menu appears on primary display (the x,y coordinates change depending on where the right-click was - just on the wrong monitor!)

a7lan commented 3 years ago

any news?

Aokromes commented 3 years ago

any news?

maybe amd or QT must fix it.

ilya-fedin commented 3 years ago

any news?

no one reported this to Qt nor to AMD AFAIK yet

a7lan commented 3 years ago

Found bug in qt bug tracker https://bugreports.qt.io/browse/QTBUG-84545 https://bugreports.qt.io/browse/QTBUG-84462

ilya-fedin commented 3 years ago

Found bug in qt bug tracker

They are closed

ilya-fedin commented 3 years ago

They are also about standard menus, while tdesktop uses custom menu widgets, so the bug should be somewhere in Qt platform code or in QWidget. Probably Qt incorrectly handles geometry with multiple GPUs.

ilya-fedin commented 3 years ago

This issue probably won't move forward until someone with such hardware debug this and find the cause

TheNoim commented 3 years ago

Ok this just sucks. Any workaround for this? This is really annoying. It also happens for Images if you click on them.

a7lan commented 3 years ago

Ok this just sucks. Any workaround for this? This is really annoying. It also happens for Images if you click on them.

I found a workaround for myself. Made the second monitor the main monitor. The context menu is now displayed correctly

TheNoim commented 3 years ago

Ok this just sucks. Any workaround for this? This is really annoying. It also happens for Images if you click on them.

I found a workaround for myself. Made the second monitor the main monitor. The context menu is now displayed correctly

I mean, the thing is, it not always happens. I have three monitors and sometimes it is correct, sometimes it isn't. In this exact moment, it is correct. Context and images show on the same monitor as telegram. But yesterday it wasn't correct.

epigramx commented 3 years ago

Consistently happening on the latest drivers here. Tg is on a secondary monitor. There's also an intel output to another monitor but that may be unrelated.

epigramx commented 3 years ago

PS All the qtbugs you list above are CLOSED!

ilya-fedin commented 3 years ago

Someone listed wrong qtbugs, this issue was never reported to qt

JDTm commented 3 years ago

Also happen on MacBook Pro 13" early 2020 - i5 with Intel Iris Plus Graphics 1536 MB . Telegram 2.9.3 MacOs 11.4

rdaraujo commented 3 years ago

It seems bug's still present.

Telegram 3.0.4 beta x64
Windows 10 20H2 (19042.1237)
RX580 (Radeon 21.8.2) + Intel HD Graphics 4000

With same setup (hardware, drivers) and Telegram 1.8.15 it works just fine. So maybe it's not a AMD problem. Also Unigram (Telegram alternative client) works fine (I don't know if it uses Qt).

ilya-fedin commented 3 years ago

Qt was updated two times since 1.8.15. In 1.9.0 and 2.4.8. Unigram doesn't use Qt.

Aokromes commented 3 years ago

It seems bug's still present.

Telegram 3.0.4 beta x64
Windows 10 20H2 (19042.1237)
RX580 (Radeon 21.8.2) + Intel HD Graphics 4000

With same setup (hardware, drivers) and Telegram 1.8.15 it works just fine. So maybe it's not a AMD problem. Also Unigram (Telegram alternative client) works fine (I don't know if it uses Qt).

try qbittorrent.

MIOsystems commented 3 years ago

This problem gets really annoying. Still in the latest (3.1.5 beta x64). Shouldn't we add up the priority on this one?

On a: AMD Ryzen 7 4800H with Radeon Graphics

image

Aokromes commented 3 years ago

This problem gets really annoying. Still in the latest (3.1.5 beta x64). Shouldn't we add up the priority on this one?

On a: AMD Ryzen 7 4800H with Radeon Graphics

it's very likely bug on qt or amd gfx drivers or a combination of both.

MIOsystems commented 3 years ago

Can i do some testing to locate the problem?

Aokromes commented 3 years ago

Can i do some testing to locate the problem?

try qbittorrent, if it fails it's clear it's not telegram desktop bug.

TheDjEzio commented 3 years ago

Sorry for the (maybe stupid) question. What does qbittorrent have to do with telegram?

Aokromes commented 3 years ago

Sorry for the (maybe stupid) question. What does qbittorrent have to do with telegram?

it uses QT like telegram desktop.

TheDjEzio commented 3 years ago

ok i tried qbittorrent, it works fine, open the right button on the right screen at the right position

ilya-fedin commented 3 years ago

Can i do some testing to locate the problem?

Yes, you can add some logging (I can send a patch with such logging) with positions of the menus and screens, build tdesktop from sources, reproduce the problem and publish these log lines here

ilya-fedin commented 3 years ago

it uses QT like telegram desktop.

both tdesktop and qbiittorrent don't use Quick Time, they use Qt ;)

ilya-fedin commented 3 years ago

Testing with qBittorrent doesn't really has sense, tdesktop has custom menu widgets and Qt changed something in 5.6...5.12 that affects only tdesktop's custom menus, while the standard QMenu widget seem to work just fine

MIOsystems commented 3 years ago

Can i do some testing to locate the problem?

Yes, you can add some logging (I can send a patch with such logging) with positions of the menus and screens, build tdesktop from sources, reproduce the problem and publish these log lines here

Okay. Please help me build the patch. I will try to implement and build it

TheGreatSkeeve commented 3 years ago

I've found this is SUPER random, and I honestly can't figure out what it's dependent on.

It was happening on my machine quite some time ago, and just recently came back. Hardware is the same, OS is the same except for feature updates.

Funnily enough, I RDP into my work laptop, and Telegram has no issue there. Same monitor count.

Thanks to everyone for keeping this open, my day was ruined when this bug came back haha.

sanderjn commented 2 years ago

I'm on Macbook Pro M1 2020 and I have a somewhat related issue when connected to a second monitor. When opening Telegram Desktop all is fine, but when the Macbook goes to sleep mode (monitor switches off) and I activate it again, most of the times (maybe all the times?) the Right-click menu is not opening afterwards. Images open on the wrong display with some weird dimensions as well. I then have to quit Telegram and open it again to make it work properly.

steffanhalv commented 2 years ago

@sanderjn same problem for me on macbook pro. The problem happends also if I disconnect one of my monitors, then it also goes wrong and I have to restart Telegram to get the ctx menu at the correct position.

ilya-fedin commented 2 years ago

mac & linux official binaries use Qt 6.2 since 3.2, is something changed to this bug on macos?

github-actions[bot] commented 2 years ago

This issue has been automatically closed because there has been no response to our request for more information from the original author. With only the information that is currently in the issue, we don't have enough information to take action. Please reach out if you have or find the answers we need so that we can investigate further.

MIOsystems commented 2 years ago

I don't think closing this issue is a solution. What information can i deliver to explorer more?

I have a new discovery on this. I work on an AMD laptop with a external monitor. When the external monitor is the primary screen, everything works fine. When i set my laptop screen primary (external monitor as secondary) The content menu is always aimed at the primary (laptop screen). Maybe this is a hint?

ilya-fedin commented 2 years ago

@MIOsystems see this post https://github.com/telegramdesktop/tdesktop/issues/7099#issuecomment-962573245. If the question will be answered, the issue will be reopened.

sanderjn commented 2 years ago

mac & linux official binaries use Qt 6.2 since 3.2, is something changed to this bug on macos?

Nothing has changed for me on Big Sur 11.6

ilya-fedin commented 2 years ago

Nothing has changed for me on Big Sur 11.6

What's your tdesktop version?

sanderjn commented 2 years ago

Nothing has changed for me on Big Sur 11.6

What's your tdesktop version?

3.2

sanderjn commented 2 years ago

Sometimes with the external monitor setup even left clicks seem to be off when selecting a chat. For example: I click the first chat and the one that is at the bottom of the screen opens. Makes me close and reopen Telegram Desktop a few dozen times a day.

github-actions[bot] commented 2 years ago

This issue has been automatically closed because there has been no response to our request for more information from the original author. With only the information that is currently in the issue, we don't have enough information to take action. Please reach out if you have or find the answers we need so that we can investigate further.

VenaNocta commented 2 years ago

Quite frankly it seems this Issue is still evident....

Here are some extra specs (mine) and as described above: The Contect-Menue opens one the same x and y as the curser but always on the primary Monitor. Specs: Win 10 Pro + 3 Screens Graphics: AMD Radeon RX 6800 XT (2 Screens) (1 is the primary Monitor) NVIDIA GeForce GTX 1050 Ti (1 Screen)

kandreak commented 2 years ago

came up this morning, versione 3.2.1 That's REAALLY annoying.

Happens to me on win10, integrated intel graphic card, 2 screens with a couple desktops. the menu does not even appear in the other screen!

hellodit commented 2 years ago

Does anyone know how to fix this issue?

sanderjn commented 2 years ago

Not really, but restarting Telegram works for me.

hellodit commented 2 years ago

Not really, but restarting Telegram works for me.

it's happen when starting the app, restarting not work for me

Drakulas01 commented 2 years ago

Have this issue. Had dual monitor setup with one GPU (1060 3g) - didn't have an issue. After switching to a laptop I have this behavior. Second monitor is hooked up through HDMI and always rendered by nvidia GPU, while the main screen is rendered by AMD integrated APU. The issue is VERY annoying, and telegram is the only app with such behavior Telegram version 3.3

Drakulas01 commented 2 years ago

Forcing app to use nvidia gpu seems to solve the issue. Go to settings -> Display -> Scroll down to graphics settings -> In this menu choose in drop-down list Desktop application -> Browse -> Choose the telegram .exe and then set it to use the gpu you need, then restart the app. https://www.itechtics.com/use-specific-gpu/ - same instructions but with images

Aokromes commented 2 years ago

Forcing app to use nvidia gpu seems to solve the issue. Go to settings -> Display -> Scroll down to graphics settings -> In this menu choose in drop-down list Desktop application -> Browse -> Choose the telegram .exe and then set it to use the gpu you need, then restart the app. itechtics.com/use-specific-gpu - same instructions but with images

then it's clear it's amd bug....

MIOsystems commented 2 years ago

Forcing app to use nvidia gpu seems to solve the issue

Great! Works for me. Although it not the the fix it supposes to be. I'm happy to see a workaround for it.

hellodit commented 2 years ago

Forcing app to use nvidia gpu seems to solve the issue. Go to settings -> Display -> Scroll down to graphics settings -> In this menu choose in drop-down list Desktop application -> Browse -> Choose the telegram .exe and then set it to use the gpu you need, then restart the app. https://www.itechtics.com/use-specific-gpu/ - same instructions but with images

Thanks it's work for me! using AMD+Nvdia GPU