Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » TopWindow&PopUp, TrayIcon » Fullscreen in linux
Fullscreen in linux [message #39599] Wed, 03 April 2013 14:52 Go to next message
Zbych is currently offline  Zbych
Messages: 325
Registered: July 2009
Senior Member
Hi,

I am trying to open full screen window from my application. Unfortunately only main window is able to do this, all other windows aren't.
Do you have any idea how to convince window manager (metacity? ubuntu 10.04 and 12.04), to let all windows go fullscreen?

Test code:
#include <CtrlLib/CtrlLib.h>

using namespace Upp;

static int i = 0;

struct MyAppWindow : TopWindow {
	
	Label l;

    virtual void LeftDown(Point pos, dword flags) {
        MyAppWindow().Run();
    }

    MyAppWindow() {
        Title("Fullscreen");
        FullScreen();
        l.SetLabel(Format("\1[= Window %d&Click to open next window]", ++i));
        l.SizePos();
        Add(l);
    }
};


GUI_APP_MAIN

{
	MyAppWindow().Run();
}

Re: Fullscreen in linux [message #39604 is a reply to message #39599] Wed, 03 April 2013 20:14 Go to previous messageGo to next message
Didier is currently offline  Didier
Messages: 680
Registered: November 2008
Location: France
Contributor
fullscreen applies to the window it is executed on.

So to get it for all screens you have to add it to all you're dialogs.

Re: Fullscreen in linux [message #39605 is a reply to message #39604] Wed, 03 April 2013 21:03 Go to previous messageGo to next message
Zbych is currently offline  Zbych
Messages: 325
Registered: July 2009
Senior Member
Didier wrote on Wed, 03 April 2013 20:14

So to get it for all screens you have to add it to all you're dialogs.



Why do you think I didn't apply Fullscreen to all dialogs? Take a look at the example code. In ubuntu 12.04 I had to add also Sizeable(), otherwise even first window wasn't full screen (it was maximized).
Re: Fullscreen in linux [message #39606 is a reply to message #39599] Wed, 03 April 2013 21:26 Go to previous messageGo to next message
Klugier is currently offline  Klugier
Messages: 1075
Registered: September 2012
Location: Poland, Kraków
Senior Contributor
Hi Zbych,

I have the same problem on all my gtk base distributions (Ubuntu 12.10 (In this case fullscreen completely dosen't work!) & Xubungu 12.10). On Kubuntu 12.10 your example code works very well.

Sincerely,
Klugier


U++ - one framework to rule them all.
Re: Fullscreen in linux [message #41804 is a reply to message #39599] Fri, 24 January 2014 00:17 Go to previous messageGo to next message
Alboni is currently offline  Alboni
Messages: 214
Registered: January 2012
Location: Deventer, Netherlands
Experienced Member
Are you saying this is a Gnome issue?
Re: Fullscreen in linux [message #41808 is a reply to message #39606] Fri, 24 January 2014 09:00 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Try OpenMain(). It is possible that WM disallows it for dependent windows.

Mirek
Re: Fullscreen in linux [message #41811 is a reply to message #41808] Fri, 24 January 2014 14:00 Go to previous messageGo to next message
Zbych is currently offline  Zbych
Messages: 325
Registered: July 2009
Senior Member
mirek wrote on Fri, 24 January 2014 09:00

Try OpenMain(). It is possible that WM disallows it for dependent windows.


Yes, it works. Thank you.
Re: Fullscreen in linux [message #41812 is a reply to message #39599] Fri, 24 January 2014 20:04 Go to previous message
Alboni is currently offline  Alboni
Messages: 214
Registered: January 2012
Location: Deventer, Netherlands
Experienced Member
I was fighting with this also.

I got this working in debian (with gnome classic) and Windows

#include <CtrlLib/CtrlLib.h>

using namespace Upp;

#define LAYOUTFILE <MaximizeTest/MaximizeTest.lay>
#include <CtrlCore/lay.h>

class MaximizeTest : public WithMaximizeTestLayout<TopWindow> {
public:
	typedef MaximizeTest CLASSNAME;
	MaximizeTest()
	{
		CtrlLayoutCancel(*this, "Window title");
		Sizeable(); FullScreen();
		button<<=THISBACK(DoPopup);
	}
	void DoPopup()
	{
		WithPopupLayout<TopWindow> dlg;
		CtrlLayoutCancel(dlg, "popup");
#ifdef PLATFORM_WIN32
		FrameLess().Maximize();
#ifndef _DEBUG
		dlg.TopMost();
#endif		
#else		
		Hide(); dlg.OpenMain(); dlg.Sizeable(); dlg.FullScreen();
#endif		
		dlg.ExecuteCancel();
#ifndef PLATFORM_WIN32		
		Show();
#endif		
	}
};



GUI_APP_MAIN
{
	MaximizeTest().Run();
}

[Updated on: Fri, 24 January 2014 20:04]

Report message to a moderator

Previous Topic: Child Form minimized if Main Form is Zoomable
Next Topic: Issue with ToolWin
Goto Forum:
  


Current Time: Fri Mar 29 09:35:35 CET 2024

Total time taken to generate the page: 0.01487 seconds