nedit-ng icon indicating copy to clipboard operation
nedit-ng copied to clipboard

Multiscreen problem

Open sambo57u opened this issue 4 years ago • 5 comments

Hi, first thanks for this great work. I am having an issue when opening a new file. The message box that pops up is on another screen (I have 3 monitors). Namely,

nedit-ng jj

when jj does not exist. The box pops up somewhere else and if you missed it you would think that nedit froze bacause you have not clicked on the "New File" button on the popup.

sambo57u avatar Jan 11 '21 14:01 sambo57u

PS: I build nedit-ng from git almost daily and I am on Fedora 33.

sambo57u avatar Jan 11 '21 14:01 sambo57u

This may be a tough one since I don't really pick where message boxes go, that's something the window manager decides. But I can see if there's some way to improve it.

eteran avatar Jan 11 '21 14:01 eteran

So, according to the documentation, a message box is supposed to by default, center on its parent. I'll have to investigate why it isn't doing that.

There are two APIs that Qt offers for messagebox's and this is one of the ones that uses the more "custom one", so it can have non-standard button choices. Maybe that's a factor. We'll see.

eteran avatar Jan 11 '21 20:01 eteran

Hi Evan, just a reminder about this issue which I'm also seeing on Mac (I don't remember it happening before your recent fix for my new-windows issue, although it might have). Dialogs that are called up from Menu items do appear on the correct screen, but I just switched tabs to a file that had been updated by a git pull and the dialog there opened on my Primary screen, which is not usually where I was running Nedit-ng. Thanks!

  • Andrew

anjohnson avatar Mar 16 '22 19:03 anjohnson

@anjohnson I don't think that the recent "new-window" fix should have affected this, but thanks for putting this back on my radar. Using Qt's built-in messagebox system has pros and cons, the main pro is that for very little code we get a native looking standard message box. The con is that we sacrifice a little but of control.

I'll have to look and see if there is a way to politely ask Qt to consider a specific screen to be the "current one".. but this may be an issue best addressed deep in Qt itself :-/

eteran avatar Mar 16 '22 20:03 eteran