Skip to content

Commit

Permalink
Client: Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
skyjake committed Apr 7, 2013
1 parent b338c0d commit 39f9e61
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions doomsday/libgui/src/persistentcanvaswindow.cpp
Expand Up @@ -471,15 +471,22 @@ DENG2_PIMPL(PersistentCanvasWindow)
applyAttributes(attribs.constData());
}

/**
* Parse attributes and apply the values to the widget.
*
* @param attribs Zero-terminated array of attributes and values.
*/
void applyAttributes(int const *attribs)
{
LOG_AS("applyAttributes");

// Parse the attributes array and check the values.
DENG2_ASSERT(attribs);

// The new modified state.
// Update the cached state from the authoritative source:
// the widget itself.
state = widgetState();

// The new modified state.
State mod = state;

for(int i = 0; attribs[i]; ++i)
Expand Down Expand Up @@ -563,7 +570,7 @@ DENG2_PIMPL(PersistentCanvasWindow)
void applyToWidget(State const &newState)
{
// If the display mode needs to change, we will have to defer the rest
// of the state changes.
// of the state changes so that everything catches up after the change.
TimeDelta defer = 0;
DisplayMode const *newMode = newState.displayMode();
bool modeChanged = false;
Expand Down Expand Up @@ -601,10 +608,12 @@ DENG2_PIMPL(PersistentCanvasWindow)

if(modeChanged)
{
#ifdef MACOSX
if(newState.isFullscreen())
{
queue << Task(Task::MacRaiseOverShield);
}
#endif
queue << Task(Task::NotifyModeChange, .1);
}

Expand Down

0 comments on commit 39f9e61

Please sign in to comment.