PDA

View Full Version : app to cover both monitor screens on ubuntu nvidia dual-monitor setup?



akos.maroy
28th April 2014, 17:12
I'm trying to make a Qt app cover both monitor screens in a dual screen setup. The idea is to simply use


move(0, 0);
resize(2*1920, 1080);

calls to the main window, where each of my screens is of 1920x1080 resolution.

On Windows, this achieves the desired result, but on Linux, the size of the window is always limited to a single screen.

I wonder how to solve this issue?

xdpyinfo reports the combined screen size:


$ xdpyinfo | grep dimensions
dimensions: 3840x1080 pixels (1016x286 millimeters)


while for the following, I get:


std::cout << "screen 0: " << QApplication::desktop()->screenGeometry(0).width() << std::endl;
std::cout << "max size: " << view.maximumSize().width() << std::endl;
std::cout << "max viewport: " << view.maximumViewportSize().width() << std::endl;



screen 0: 1920
max size: 16777215
max viewport: 640


this is on ubuntu 14.04 64 bit, with an nvidia GTX760 card, using the latest nvidia factory drivers

anda_skoa
28th April 2014, 17:23
Looks like your configuration is two screens, each mapping to one physical screen.

If I remember correctly there is an Nvidia tool that allows you to tell the driver to make it one big screen instead

Cheers,
_

high_flyer
29th April 2014, 09:14
Is Xinerama used on your X?
What does QDesktopWidget::isVirtualDesktop() return?
Have a look at QX11Info class - maybe it can offer you some functions that might help.