VirtualBox

Opened 15 years ago

Closed 14 years ago

#4952 closed enhancement (fixed)

Minimize button on the mini toolbar => Fixed in SVN

Reported by: oskar.hermansson@… Owned by:
Component: GUI Version: VirtualBox 3.0.6
Keywords: mini toolbar Cc:
Guest type: other Host type: other

Description

I like the new mini toolbar, but I'm missing a 'minimize button' to minimize the fullscreen window.

Today I first have to exit fullscreen to minimize the window.

I'm running on Win XP host but I guess it applies to all hosts and guests.

Change History (17)

comment:1 by Lukas, 15 years ago

I agree, this would save me and others a lot of time in our daily work.

I found another related ticket http://www.virtualbox.de/ticket/2097

comment:2 by Bernt, 15 years ago

This is a most wanted feature! I constantly have problems with resizing the guest. I would really welcome an option to keep my guest at fullscreen all the time (including boot/startup)- then my carefully edited desktop would remain..!

comment:3 by ain, 14 years ago

Agreed! I'm really missing the minimize button on VBox's toolbar when using guest in full screen mode (which is the only way I run my guests). I'm also using VMware which has it and I'm so used to it...

comment:4 by Guillaume Pothier, 14 years ago

+1

comment:5 by SEN, 14 years ago

And Hot Keys need too (Host+...)

comment:6 by Anton Baskanov, 14 years ago

+1

comment:7 by peter_b, 14 years ago

+1

comment:8 by Ramiro Franco, 14 years ago

+1

comment:9 by Eric Jacksch, 14 years ago

+1 This would make my life much easier...please!

comment:10 by Chris, 14 years ago

This is a really big deal! I am constantly flipping back and forth between my host and guest oses and I want my guest os to stay full screened most of the time -- but right now, to do the back and forth I have to go through all kinds of awkwardness: window, minimize, restore, full screen -- which involves a lot of key presses and a resizing of my guest os desktop, which I do want when intentionally switching to windowed mode specifically, not just to minimize the virtualbox guest os -- or I have to use host key, alt+tab and cycle that way, but it doesn't actually minimize my virtualbox guest os (I see it in the background instead of my host desktop), I have to do that separately, so more key presses and clicking and awkwardness. Surely a minimize to taskbar button with an associated shortcut host key combo would be ridiculously simple to add, and this is so commonly requested in other forums (e.g. http://ubuntuforums.org/showthread.php?t=1278734 , http://forums.virtualbox.org/viewtopic.php?t=10715 @ windows host comments, etc )...

The fact that this has been requested multiple times (as noted above, ticket #2097 as well) going back several _years_ at this point is kind of disappointing...

Please add this, thanks!

in reply to:  10 comment:11 by Chris, 14 years ago

I did some quick searching for "toolbar" through the OSE source for 3.2.8 and found what looks like relevant code (all in VirtualBox-3.2.8_OSE/src/VBox/Frontends/VirtualBox/src/):

runtime/fullscreen/UIMachineWindowFullscreen.cpp::prepareMiniToolBar() line 209
runtime/seamless/UIMachineWindowSeamless.cpp::prepareMiniToolBar() line 258
widgets/VBoxMiniToolBar.cpp::VBoxMiniToolBar() line 101

(for other VBox code versions, try:
grep -rn 'SIGNAL(exitAction())' ./src/VBox/Frontends/VirtualBox/src/*)

places where, ultimately, SIGNAL(exitAction()) is attached to the windowing button in the toolbar. We should assumedly copy those function calls / assignments and create one for "minAction" or "minimizeAction" in the same places although I couldn't find where exitAction or the SIGNAL macro/function is defined for the various host OSes in order to suggest the location for the creation of minAction, with reference to exitAction's definition which would likely be very similar to the necessary code for minAction.

Interestingly, I was unable to find the programming for the host key shortcut for entering/leaving fullscreen mode (host+f), in hopes that I could recommend how to do the minimizing with a host shortcut key as well.

Good luck, I hope this helps, and thanks!

comment:12 by Michael Thayer, 14 years ago

If you are interested in host key handling, see the UIActionsPool object (and particularly its contructor) in the file src/VBox/Frontends/VirtualBox/src/runtime/UIActionsPool.cpp .

comment:13 by Chris, 14 years ago

For the record, I've never done any Qt gui programming, so I'm new to its signaling system. I now see that SIGNAL() and SLOT() are macros for Qt and thus the host OS dependent programming is handled by Qt, not by VirtualBox for the details of windowing -- as far as we care here at least.

So, from what I can tell now, we need to:
1) declare void minimizeAction(); as a signal in widgets/VBoxMiniToolBar.h ~61
2) assign (after creating) m_pMinimizeAction = ... for a minimize button calling SIGNAL(minimizeAction()) ala m_pRestoreAction in widgets/VBoxMiniToolBar.cpp ~97 -- includes creating a matching 16x16 minimize icon
3) declare UIActionIndex_Simple_Minimize in enum UIActionIndex in runtime/UIActionsPool.h ~51
4) connect(m_pMiniToolBar, SIGNAL(minimizeAction()), uisession()->actionsPool()->action(UIActionIndex_Simple_Minimize), SLOT(trigger())); in runtime/fullscreen/UIMachineWindowFullscreen.cpp ~209 and in runtime/seamless/UIMachineWindowSeamless.cpp ~258
5) create class SimpleMinimizeWindowAction : public UISimpleAction { ... } ala PerformWindowAdjustAction in runtime/UIActionsPool.cpp ~194 -- here is where we define the host hotkey to be host + "M" (thanks michael!!)
6) assign m_actionsPool[UIActionIndex_Simple_Minimize] = new SimpleMinimizeWindowAction(this); in runtime/UIActionsPool.cpp ~1118

After this, I get fuzzy on how to wrap it up. I know that we need to actually attach functionality to UIActionIndex_Simple_Minimize, and I believe we do it ala m_pActionsPool->action(UIActionIndex_Toggle_Fullscreen) as connect(m_pActionsPool->action(UIActionIndex_Simple_Minimize), SIGNAL(triggered()), this, SLOT(hide()), Qt::QueuedConnection); (note: to my understanding, hide() is the predefined slot for window minimizing in Qt that we need: http://doc.qt.nokia.com/4.6/qwidget.html#hide ) in three places in runtime/UIMachine.cpp (possibly a few other changes in that file as well maybe?), but there might also be a couple other files: grep -rn 'UIActionIndex_Toggle_Fullscreen' * -- all of which seem to be related to adding this functionality to various menus of kinds I'm not clear on (anyone can explain them?) -- runtime/UIMachineLogic.cpp ~523: m_pRunningActions->addAction(actionsPool()->action(UIActionIndex_Toggle_Fullscreen)); and runtime/UIMachineMenuBar.cpp ~142: pMenu->addAction(pActionsPool->action(UIActionIndex_Toggle_Fullscreen));

I really want to see this happen soon, and I hope a dev who's comfortable with building VBox (and involved in creating the next release of the PUEL) can take the outline I've presented here, add in any necessary vbox issues I've missed, and ultimately make it come to life quickly and easily. If anyone else has input, or corrections to what I've listed here, please chime in!

Thanks.

comment:14 by Milika, 14 years ago

+1 Minimize in full-screen is really important!!

comment:15 by Frank Mehnert, 14 years ago

Summary: Minimize button on the mini toolbarMinimize button on the mini toolbar => Fixed in SVN

That button will be there in the next maintenance release.

comment:16 by Milika, 14 years ago

Ur awesome, thank you!!!

comment:17 by Sander van Leeuwen, 14 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.

© 2023 Oracle
ContactPrivacy policyTerms of Use