GithubHelp home page GithubHelp logo

Comments (10)

sencer avatar sencer commented on July 28, 2024

Same problem. This is very annoying.

from goldendict.

sencer avatar sencer commented on July 28, 2024

Solution seems to be pretty easy though!

change

QRect desktop = QApplication::desktop()->screenGeometry();

in scanpopup.cc to

QRect desktop = QApplication::desktop()->screenGeometry(1);

that's all!

from goldendict.

Tvangeste avatar Tvangeste commented on July 28, 2024

@sencer, why specifically screen 1? What if user tries to work with GoldenDict on screen 2 or 3 or 4? :) I would say that the 100% correct fix would be to detect the current screen and limit the pop-up to this particular current screen.

from goldendict.

sencer avatar sencer commented on July 28, 2024

Because screen(1) gives the current screen?

from goldendict.

Tvangeste avatar Tvangeste commented on July 28, 2024

Looking at the docs:

const QRect QDesktopWidget::screenGeometry(int screen = -1) const
Returns the geometry of the screen with index screen.
The default screen is used if screen is -1.

So it looks like the screen(1) would just return the first screen, it might not be the default one, and it might not be the current one.

from goldendict.

sencer avatar sencer commented on July 28, 2024

Interesting, since I just compiled goldendict on my ubuntu box with two screens and the scan popup window appears in which ever monitor I am on.

Hence, either qt indexes screens with the active one being the 1st, or there is a handy bug here.

from goldendict.

sencer avatar sencer commented on July 28, 2024

While currently this works, I guess something including QDesktopWidget::screenNumber would be a better way of doing it. Perhaps just?

QRect desktop = QApplication::desktop()->screenGeometry(QDesktopWidget::screenNumber());

from goldendict.

chulai avatar chulai commented on July 28, 2024

@sencer, even if this change is trivial we have to test in different platforms: OS X, Windows (XP, Vista, 7, 8) and Linux with different Window Managers.

from goldendict.

sencer avatar sencer commented on July 28, 2024

Sure.

from goldendict.

Tvangeste avatar Tvangeste commented on July 28, 2024

Once we are done with 1.5 release, I'll take a closer look. I wanted to install Linux on my main workstation (with two monitors) for quite some time already... :)

from goldendict.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.