Ticket #4952 (closed enhancement: fixed)

Opened 11 years ago

Last modified 9 years ago

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


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

comment:1 Changed 11 years ago by osram

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

I found another related ticket

comment:2 Changed 10 years ago by bernt.ribbum

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 Changed 10 years ago by ain

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 Changed 10 years ago by gpothier


comment:5 Changed 10 years ago by sendel

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

comment:6 Changed 10 years ago by baskanov


comment:7 Changed 10 years ago by peter_b


comment:8 Changed 10 years ago by rjfranco


comment:9 Changed 10 years ago by jacksch

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

comment:10 follow-up: ↓ 11 Changed 10 years ago by cricel472

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. , @ 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!

comment:11 in reply to: ↑ 10 Changed 10 years ago by cricel472

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 Changed 10 years ago by michael

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 Changed 10 years ago by cricel472

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: ) 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!


comment:14 Changed 10 years ago by milika

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

comment:15 Changed 10 years ago by frank

  • Summary changed from Minimize button on the mini toolbar to Minimize button on the mini toolbar => Fixed in SVN

That button will be there in the next maintenance release.

comment:16 Changed 10 years ago by milika

Ur awesome, thank you!!!

comment:17 Changed 9 years ago by sandervl73

  • Status changed from new to closed
  • Resolution set to fixed
Note: See TracTickets for help on using tickets.
ContactPrivacy policyTerms of Use