#include "Layout.h"
#include "LyX.h"
#include "LyXFunc.h"
+#include "TextClass.h"
#include "ToolbarBackend.h"
#include "support/debug.h"
LYXERR(Debug::INIT, "Adding " << tb->key << " at position "
<< tb->info.posx << " " << tb->info.posy);
// add toolbar break if posx or posy changes
- bool newline = tb->info.location == last_loc && (
+ bool newline = tb->info.location == last_loc && (
// if two toolbars at the same location, assume uninitialized and add toolbar break
(tb->info.posx == last_posx && tb->info.posy == last_posy) ||
(last_loc == ToolbarSection::ToolbarInfo::TOP && tb->info.posy != last_posy) ||
void GuiToolbars::toggleFullScreen(bool start_full_screen)
{
+ // we need to know number of fullscreens until every
+ // LyXView has its own toolbar configuration
+ toolbarbackend.fullScreenWindows += start_full_screen ? 1 : -1;
+
// extracts the toolbars from the backend
ToolbarBackend::Toolbars::iterator cit = toolbarbackend.begin();
ToolbarBackend::Toolbars::iterator end = toolbarbackend.end();
- int flags;
+ int flags = 0;
for (; cit != end; ++cit) {
if (start_full_screen) {
- flags = cit->before_fullscreen = cit->flags;
+ if (toolbarbackend.fullScreenWindows == 1)
+ flags = cit->before_fullscreen = cit->flags;
TurnOffFlag(ON);
TurnOffFlag(AUTO);
TurnOnFlag(OFF);