diff options
| author | Steven Bennetts <steve@lindenlab.com> | 2007-03-02 19:11:06 +0000 | 
|---|---|---|
| committer | Steven Bennetts <steve@lindenlab.com> | 2007-03-02 19:11:06 +0000 | 
| commit | d4462963c6ba5db2088723bbedc7b60f1184c594 (patch) | |
| tree | 34aaba4b31f93388b0ce3b2b36e9c49823bec2cf /indra | |
| parent | b53c377727d216cb277ba14ba4c73b9b9bb96b32 (diff) | |
merge -r 58503:58641 maintenance -> release
Diffstat (limited to 'indra')
| -rw-r--r-- | indra/llcommon/llpreprocessor.h | 4 | ||||
| -rw-r--r-- | indra/llui/llfloater.cpp | 120 | ||||
| -rw-r--r-- | indra/llui/llfloater.h | 8 | ||||
| -rw-r--r-- | indra/llui/llmenugl.cpp | 1 | ||||
| -rw-r--r-- | indra/llui/llview.cpp | 29 | ||||
| -rw-r--r-- | indra/llui/llview.h | 6 | ||||
| -rw-r--r-- | indra/newview/llchatbar.cpp | 2 | ||||
| -rw-r--r-- | indra/newview/lldynamictexture.cpp | 1 | ||||
| -rw-r--r-- | indra/newview/llfloaterabout.cpp | 3 | ||||
| -rw-r--r-- | indra/newview/llfloaterimagepreview.cpp | 3 | ||||
| -rw-r--r-- | indra/newview/llfolderview.cpp | 9 | ||||
| -rw-r--r-- | indra/newview/llinventorymodel.cpp | 2 | ||||
| -rw-r--r-- | indra/newview/llpreview.cpp | 1 | ||||
| -rw-r--r-- | indra/newview/llpreviewtexture.cpp | 51 | ||||
| -rw-r--r-- | indra/newview/llselectmgr.cpp | 35 | ||||
| -rw-r--r-- | indra/newview/llstartup.cpp | 5 | ||||
| -rw-r--r-- | indra/newview/lltoolfocus.cpp | 4 | ||||
| -rw-r--r-- | indra/newview/llviewerdisplay.cpp | 28 | ||||
| -rw-r--r-- | indra/newview/llviewerwindow.cpp | 49 | ||||
| -rw-r--r-- | indra/newview/llviewerwindow.h | 8 | 
20 files changed, 129 insertions, 240 deletions
| diff --git a/indra/llcommon/llpreprocessor.h b/indra/llcommon/llpreprocessor.h index f86a9b5a9e..f4e24025d5 100644 --- a/indra/llcommon/llpreprocessor.h +++ b/indra/llcommon/llpreprocessor.h @@ -32,7 +32,9 @@  	#define LL_LIBXUL_ENABLED		1  #elif LL_LINUX  	#define LL_QUICKTIME_ENABLED	0 -	#define LL_LIBXUL_ENABLED		1 +        #ifndef LL_LIBXUL_ENABLED +                #define LL_LIBXUL_ENABLED		1 +        #endif // def LL_LIBXUL_ENABLED  #endif  #if LL_LIBXUL_ENABLED && !defined(MOZILLA_INTERNAL_API) diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp index b56ae5167b..3b855a6360 100644 --- a/indra/llui/llfloater.cpp +++ b/indra/llui/llfloater.cpp @@ -487,17 +487,6 @@ void LLFloater::setVisible( BOOL visible )  	}  } -LLView*	LLFloater::getRootMostFastFrameView() -{ -	// trying to render a background floater in a fast frame, abort!!! -	//if (!isFrontmost()) -	//{ -	//	gViewerWindow->finishFastFrame(); -	//} - -	return LLView::getRootMostFastFrameView(); -} -  void LLFloater::open()	/* Flawfinder: ignore */  {  	//RN: for now, we don't allow rehosting from one multifloater to another @@ -673,7 +662,7 @@ const LLString& LLFloater::getTitle() const  void LLFloater::translate(S32 x, S32 y)  { -	LLView::translate(x, y); +	LLPanel::translate(x, y);  	if (x != 0 || y != 0)  	{ @@ -703,7 +692,7 @@ BOOL LLFloater::canSnapTo(LLView* other_view)  		}  	} -	return LLView::canSnapTo(other_view); +	return LLPanel::canSnapTo(other_view);  }  void LLFloater::snappedTo(LLView* snap_view) @@ -1194,9 +1183,9 @@ void LLFloater::onClickTearOff(void *userdata)  		self->open();	/* Flawfinder: ignore */  		self->setRect(new_rect);  		gFloaterView->adjustToFitScreen(self, FALSE); -		self->setCanDrag(TRUE);		 -		self->setCanResize(TRUE);		 -		self->setCanMinimize(TRUE); +		self->setCanDrag(TRUE); +		// give focus to new window to keep continuity for the user +		self->setFocus(TRUE);  	}  	else  //Attach to parent.  	{ @@ -1347,6 +1336,17 @@ void LLFloater::draw()  			focused_child->setVisible(TRUE);  		}  		drawChild(focused_child); + +		// update tearoff button for torn off floaters +		// when last host goes away +		if (mCanTearOff && !getHost()) +		{ +			LLFloater* old_host = gFloaterView->getFloaterByHandle(mLastHostHandle); +			if (!old_host) +			{ +				setCanTearOff(FALSE); +			} +		}  	}  } @@ -2453,31 +2453,12 @@ LLString LLMultiFloater::getWidgetTag() const  	return LL_MULTI_FLOATER_TAG;  } -void LLMultiFloater::init(const LLString& title, BOOL resizable,  -						S32 min_width, S32 min_height, BOOL drag_on_left, -						BOOL minimizable, BOOL close_btn) -{ -	LLFloater::init(title, resizable, min_width, min_height, drag_on_left, minimizable, close_btn); - -	/*mTabContainer = new LLTabContainer("Preview Tabs",  -		LLRect(LLPANEL_BORDER_WIDTH, mRect.getHeight() - LLFLOATER_HEADER_SIZE, mRect.getWidth() - LLPANEL_BORDER_WIDTH, 0),  -		mTabPos,  -		NULL,  -		NULL); -	mTabContainer->setFollowsAll(); -	if (mResizable && mTabPos == LLTabContainerCommon::BOTTOM) -	{ -		mTabContainer->setRightTabBtnOffset(RESIZE_HANDLE_WIDTH); -	} - -	addChild(mTabContainer);*/ -} -  void LLMultiFloater::open()	/* Flawfinder: ignore */  {  	if (mTabContainer->getTabCount() > 0)  	{  		LLFloater::open();	/* Flawfinder: ignore */ +		resizeToContents();  	}  	else  	{ @@ -2549,16 +2530,9 @@ void LLMultiFloater::growToFit(LLFloater* floaterp, S32 width, S32 height)  		// store new width and height with this floater so that it will keep its size when detached  		found_data_it->second.mWidth = width;  		found_data_it->second.mHeight = height; - -		S32 cur_height = mRect.getHeight(); -		reshape(llmax(mRect.getWidth(), width + LLPANEL_BORDER_WIDTH * 2), llmax(mRect.getHeight(), height + LLFLOATER_HEADER_SIZE + TABCNTR_HEADER_HEIGHT + (LLPANEL_BORDER_WIDTH * 2))); -		 -		// make sure upper left corner doesn't move -		translate(0, mRect.getHeight() - cur_height); - -		// Try to keep whole view onscreen, don't allow partial offscreen. -		gFloaterView->adjustToFitScreen(this, FALSE);  	} + +	resizeToContents();  }  /** @@ -2699,24 +2673,7 @@ void LLMultiFloater::removeFloater(LLFloater* floaterp)  	if (mAutoResize)  	{ -		floater_data_map_t::iterator floater_it; -		S32 new_width = 0; -		S32 new_height = 0; -		for (floater_it = mFloaterDataMap.begin(); floater_it != mFloaterDataMap.end(); ++floater_it) -		{ -			new_width = llmax(new_width, floater_it->second.mWidth + LLPANEL_BORDER_WIDTH * 2); -			new_height = llmax(new_height, floater_it->second.mHeight + LLFLOATER_HEADER_SIZE + TABCNTR_HEADER_HEIGHT); -		}	 - -		S32 cur_height = mRect.getHeight(); - -		reshape(new_width, new_height); - -		// make sure upper left corner doesn't move -		translate(0, cur_height - new_height); - -		// Try to keep whole view onscreen, don't allow partial offscreen. -		gFloaterView->adjustToFitScreen(this, FALSE); +		resizeToContents();  	}  	tabOpen((LLFloater*)mTabContainer->getCurrentPanel(), false); @@ -2858,6 +2815,43 @@ BOOL LLMultiFloater::postBuild()  	return FALSE;  } +void LLMultiFloater::resizeToContents() +{ +	// we're already in the middle of a reshape, don't interrupt it +	floater_data_map_t::iterator floater_it; +	S32 new_width = 0; +	S32 new_height = 0; +	for (floater_it = mFloaterDataMap.begin(); floater_it != mFloaterDataMap.end(); ++floater_it) +	{ +		new_width = llmax(new_width, floater_it->second.mWidth + LLPANEL_BORDER_WIDTH * 2); +		new_height = llmax(new_height, floater_it->second.mHeight + LLFLOATER_HEADER_SIZE + TABCNTR_HEADER_HEIGHT); +	}	 + +	S32 new_min_width = 0; +	S32 new_min_height = 0; +	S32 tab_idx; +	for (tab_idx = 0; tab_idx < mTabContainer->getTabCount(); ++tab_idx) +	{ +		LLFloater* floaterp = (LLFloater*)mTabContainer->getPanelByIndex(tab_idx); +		if (floaterp) +		{ +			new_min_width = llmax(new_min_width, floaterp->getMinWidth() + LLPANEL_BORDER_WIDTH * 2); +			new_min_height = llmax(new_min_height, floaterp->getMinHeight() + LLFLOATER_HEADER_SIZE + TABCNTR_HEADER_HEIGHT); +		} +	} +	setResizeLimits(new_min_width, new_min_height); + +	S32 cur_height = mRect.getHeight(); + +	reshape(new_width, new_height); + +	// make sure upper left corner doesn't move +	translate(0, cur_height - new_height); + +	// Try to keep whole view onscreen, don't allow partial offscreen. +	gFloaterView->adjustToFitScreen(this, FALSE); +} +  // virtual  LLXMLNodePtr LLFloater::getXML(bool save_children) const  { diff --git a/indra/llui/llfloater.h b/indra/llui/llfloater.h index 05e513ed1d..79483db297 100644 --- a/indra/llui/llfloater.h +++ b/indra/llui/llfloater.h @@ -181,8 +181,6 @@ public:  	void			clearSnapTarget() { mSnappedTo.markDead(); }  	LLViewHandle	getSnapTarget() { return mSnappedTo; } -	/*virtual*/ LLView*	getRootMostFastFrameView(); -  	static void		closeFocusedFloater();  	static void		onClickClose(void *userdata); @@ -341,10 +339,6 @@ public:  	LLMultiFloater(const LLString& name, const LLString& rect_control, LLTabContainer::TabPosition tab_pos = LLTabContainer::TOP, BOOL auto_resize = FALSE);  	virtual ~LLMultiFloater(); -	virtual void init(const LLString& title, BOOL resizable,  -						S32 min_width, S32 min_height, BOOL drag_on_left, -						BOOL minimizable, BOOL close_btn); -  	virtual BOOL postBuild();  	/*virtual*/ void open();	/* Flawfinder: ignore */  	/*virtual*/ void onClose(bool app_quitting); @@ -378,6 +372,8 @@ public:  	void setTabContainer(LLTabContainerCommon* tab_container) { if (!mTabContainer) mTabContainer = tab_container; }  	static void onTabSelected(void* userdata, bool); +	virtual void resizeToContents(); +  protected:  	struct LLFloaterData  	{ diff --git a/indra/llui/llmenugl.cpp b/indra/llui/llmenugl.cpp index 4c40d99178..a7c9cf0f92 100644 --- a/indra/llui/llmenugl.cpp +++ b/indra/llui/llmenugl.cpp @@ -3044,7 +3044,6 @@ void LLMenuGL::setVisible(BOOL visible)  			mFadeTimer.stop();  		} -		//gViewerWindow->finishFastFrame();  		LLView::setVisible(visible);  	}  } diff --git a/indra/llui/llview.cpp b/indra/llui/llview.cpp index 8c3d2362c5..02a99b00cd 100644 --- a/indra/llui/llview.cpp +++ b/indra/llui/llview.cpp @@ -32,7 +32,6 @@  BOOL	LLView::sDebugRects = FALSE;  BOOL	LLView::sDebugKeys = FALSE;  S32		LLView::sDepth = 0; -LLView* LLView::sFastFrameView = NULL;  BOOL	LLView::sDebugMouseHandling = FALSE;  LLString LLView::sMouseHandlerMessage;  S32	LLView::sSelectID = GL_NAME_UI_RESERVED; @@ -93,7 +92,6 @@ LLView::LLView() :  	mSaveToXML(TRUE),  	mIsFocusRoot(FALSE),  	mLastVisible(TRUE), -	mRenderInFastFrame(TRUE),  	mSpanChildren(FALSE),  	mVisible(TRUE),  	mHidden(FALSE), @@ -114,7 +112,6 @@ LLView::LLView(const LLString& name, BOOL mouse_opaque) :  	mSaveToXML(TRUE),  	mIsFocusRoot(FALSE),  	mLastVisible(TRUE), -	mRenderInFastFrame(TRUE),  	mSpanChildren(FALSE),  	mVisible(TRUE),  	mHidden(FALSE), @@ -138,7 +135,6 @@ LLView::LLView(  	mSaveToXML(TRUE),  	mIsFocusRoot(FALSE),  	mLastVisible(TRUE), -	mRenderInFastFrame(TRUE),  	mSpanChildren(FALSE),  	mVisible(TRUE),  	mHidden(FALSE), @@ -180,11 +176,6 @@ LLView::~LLView()  		mParentView->removeChild(this);  	} -	if(LLView::sFastFrameView == this) -	{ -		LLView::sFastFrameView = NULL; -	} -  	dispatch_list_t::iterator itor;  	for (itor = mDispatchList.begin(); itor != mDispatchList.end(); ++itor)  	{ @@ -1770,26 +1761,6 @@ void LLView::localRectToScreen(const LLRect& local, LLRect* screen) const  	}  } -LLView* LLView::getRootMostFastFrameView() -{ -	if (gFocusMgr.getTopView() == this) -	{ -		return this; -	} - -	if (getParent()) -	{ -		LLView* rootmost_view = getParent()->getRootMostFastFrameView(); -		if (rootmost_view) -		{ -			return rootmost_view; -		} -	} - -	return mRenderInFastFrame ? this : NULL; -} - -  LLView* LLView::getRootView()  {  	LLView* view = this; diff --git a/indra/llui/llview.h b/indra/llui/llview.h index 839c300476..b794c087b5 100644 --- a/indra/llui/llview.h +++ b/indra/llui/llview.h @@ -145,7 +145,6 @@ protected:  public:  	LLViewHandle mViewHandle;  	BOOL		mLastVisible; -	BOOL		mRenderInFastFrame;  	BOOL		mSpanChildren;  private: @@ -161,7 +160,6 @@ public:  	static BOOL	sDebugRects;	// Draw debug rects behind everything.  	static BOOL sDebugKeys;  	static S32	sDepth; -	static LLView* sFastFrameView;  	static BOOL sDebugMouseHandling;  	static LLString sMouseHandlerMessage;  	static S32	sSelectID; @@ -319,8 +317,8 @@ public:  	virtual void	reshape(S32 width, S32 height, BOOL called_from_parent = TRUE);  	virtual void	translate( S32 x, S32 y ); +	virtual void	setOrigin( S32 x, S32 y )	{ mRect.translate( x - mRect.mLeft, y - mRect.mBottom ); }  	BOOL			translateIntoRect( const LLRect& constraint, BOOL allow_partial_outside ); -	void			setOrigin( S32 x, S32 y )	{ mRect.translate( x - mRect.mLeft, y - mRect.mBottom ); }  	LLView*			findSnapRect(LLRect& new_rect, const LLCoordGL& mouse_dir, LLView::ESnapType snap_type, S32 threshold, S32 padding = 0);  	LLView*			findSnapEdge(S32& new_edge_val, const LLCoordGL& mouse_dir, ESnapEdge snap_edge, ESnapType snap_type, S32 threshold, S32 padding = 0); @@ -418,8 +416,6 @@ public:  	virtual void	localRectToScreen( const LLRect& local, LLRect* screen ) const;  	virtual BOOL	localRectToOtherView( const LLRect& local, LLRect* other, LLView* other_view ) const; -	void			setRenderInFastFrame(BOOL render) { mRenderInFastFrame = render; } -	virtual LLView*	getRootMostFastFrameView();  	static LLWindow*	getWindow(void); diff --git a/indra/newview/llchatbar.cpp b/indra/newview/llchatbar.cpp index 34c178f509..19b6d80082 100644 --- a/indra/newview/llchatbar.cpp +++ b/indra/newview/llchatbar.cpp @@ -580,8 +580,6 @@ void LLChatBar::onInputEditorKeystroke( LLLineEditor* caller, void* userdata )  		//	<< " outlen " << out_str.getLength()  		//	<< llendl;  	} -	// make sure we don't do UI-only render as it is apparent avatar isn't animating -	gViewerWindow->finishFastFrame();  }  // static diff --git a/indra/newview/lldynamictexture.cpp b/indra/newview/lldynamictexture.cpp index 49fcce4911..0f0a9d9bda 100644 --- a/indra/newview/lldynamictexture.cpp +++ b/indra/newview/lldynamictexture.cpp @@ -187,7 +187,6 @@ BOOL LLDynamicTexture::updateAllInstances()  				if (dynamicTexture->render())  				{  					result = TRUE; -					gViewerWindow->finishFastFrame();  					sNumRenders++;  				}  				dynamicTexture->postRender(result); diff --git a/indra/newview/llfloaterabout.cpp b/indra/newview/llfloaterabout.cpp index 9c8c0162c6..5ced5eafb7 100644 --- a/indra/newview/llfloaterabout.cpp +++ b/indra/newview/llfloaterabout.cpp @@ -26,7 +26,10 @@  #include "llvieweruictrlfactory.h"  #include "viewer.h"	// for gViewerDigest +#if LL_LIBXUL_ENABLED  #include "llmozlib.h" +#endif // LL_LIBXUL_ENABLED +  #include "llglheaders.h"  extern LLCPUInfo gSysCPU; diff --git a/indra/newview/llfloaterimagepreview.cpp b/indra/newview/llfloaterimagepreview.cpp index 68a5a90bcc..1ae6decfdd 100644 --- a/indra/newview/llfloaterimagepreview.cpp +++ b/indra/newview/llfloaterimagepreview.cpp @@ -160,7 +160,6 @@ void	LLFloaterImagePreview::onPreviewTypeCommit(LLUICtrl* ctrl, void* userdata)  		break;  	}  	fp->mAvatarPreview->refresh(); -	//gViewerWindow->requestFastFrame(fp);  }  //----------------------------------------------------------------------------- @@ -470,7 +469,6 @@ BOOL LLFloaterImagePreview::handleHover(S32 x, S32 y, MASK mask)  		}  		LLUI::setCursorPositionLocal(this, mLastMouseX, mLastMouseY); -		//gViewerWindow->requestFastFrame(this);  	}  	if (!mPreviewRect.pointInRect(x, y) || !mAvatarPreview) @@ -502,7 +500,6 @@ BOOL LLFloaterImagePreview::handleScrollWheel(S32 x, S32 y, S32 clicks)  	{  		mAvatarPreview->zoom((F32)clicks * -0.2f);  		mAvatarPreview->refresh(); -		//gViewerWindow->requestFastFrame(this);  	}  	return TRUE; diff --git a/indra/newview/llfolderview.cpp b/indra/newview/llfolderview.cpp index 462e1515fd..0dc7daa587 100644 --- a/indra/newview/llfolderview.cpp +++ b/indra/newview/llfolderview.cpp @@ -3841,10 +3841,6 @@ BOOL LLFolderView::handleKeyHere( KEY key, MASK mask, BOOL called_from_parent )  		}  	} -	if (handled) -	{ -		gViewerWindow->requestFastFrame(this); -	}  	return handled;  } @@ -3880,11 +3876,6 @@ BOOL LLFolderView::handleUnicodeCharHere(llwchar uni_char, BOOL called_from_pare  		handled = TRUE;  	} -	if (handled) -	{ -		gViewerWindow->requestFastFrame(this); -	} -  	return handled;  } diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp index 90455f5902..2a686c46b9 100644 --- a/indra/newview/llinventorymodel.cpp +++ b/indra/newview/llinventorymodel.cpp @@ -2356,7 +2356,7 @@ bool LLInventoryModel::messageUpdateCore(LLMessageSystem* msg, bool account, boo  		if(!gInventory.isObjectDescendentOf(lastitem->getUUID(), trash_id))  		{  			LLMultiPreview* multi_previewp = LLMultiPreview::getAutoOpenInstance(folder_id); -			if (!multi_previewp && all_one_folder) +			if (!multi_previewp && all_one_folder && count > 1)  			{  				S32 left, top;  				gFloaterView->getNewFloaterPosition(&left, &top); diff --git a/indra/newview/llpreview.cpp b/indra/newview/llpreview.cpp index 7241b939ad..c5e589529c 100644 --- a/indra/newview/llpreview.cpp +++ b/indra/newview/llpreview.cpp @@ -473,6 +473,7 @@ LLPreview* LLPreview::getFirstPreviewForSource(const LLUUID& source_id)  LLMultiPreview::LLMultiPreview(const LLRect& rect) : LLMultiFloater("Preview", rect)  { +	setCanResize(TRUE);  }  void LLMultiPreview::open()		/*Flawfinder: ignore*/ diff --git a/indra/newview/llpreviewtexture.cpp b/indra/newview/llpreviewtexture.cpp index b9c63b5ad8..95973a102e 100644 --- a/indra/newview/llpreviewtexture.cpp +++ b/indra/newview/llpreviewtexture.cpp @@ -312,43 +312,46 @@ void LLPreviewTexture::updateAspectRatio()  		button_height = BTN_HEIGHT + PREVIEW_PAD;  	} -	LLRect window_rect(0, mRect.getHeight(), mRect.getWidth(), 0); -	window_rect.mTop -= (PREVIEW_HEADER_SIZE + CLIENT_RECT_VPAD); -	window_rect.mBottom += PREVIEW_BORDER + button_height + CLIENT_RECT_VPAD + info_height + CLIENT_RECT_VPAD; -	LLMultiFloater* hostp = getHost(); -	if (hostp) -	{ -		// try to keep aspect ratio when hosted, as hosting view can resize without user input -		mClientRect.setLeftTopAndSize(window_rect.getCenterX() - (client_width / 2), window_rect.mTop, client_width, client_height); -	} -	else +	if (client_height != mLastHeight || client_width != mLastWidth)  	{ -		mClientRect.setLeftTopAndSize(LLPANEL_BORDER_WIDTH + PREVIEW_PAD + 6, -						mRect.getHeight() - (PREVIEW_HEADER_SIZE + CLIENT_RECT_VPAD), -						mRect.getWidth() - horiz_pad, -						mRect.getHeight() - (view_height - client_height) - 8); -	} - -	if (mImage->mFullHeight > mLastHeight && mImage->mFullWidth > mLastWidth) -	{ -		mLastWidth = image_width; -		mLastHeight = image_height; +		mLastWidth = client_width; +		mLastHeight = client_height;  		S32 old_top = mRect.mTop;  		S32 old_left = mRect.mLeft; -		if (hostp) +		if (getHost())  		{ -			hostp->growToFit(this, view_width, view_height); +			getHost()->growToFit(this, view_width, view_height);  		}  		else  		{  			reshape( view_width, view_height );  			S32 new_bottom = old_top - mRect.getHeight();  			setOrigin( old_left, new_bottom ); +			// Try to keep whole view onscreen, don't allow partial offscreen. +			gFloaterView->adjustToFitScreen(this, FALSE);  		} +	} -		// Try to keep whole view onscreen, don't allow partial offscreen. -		gFloaterView->adjustToFitScreen(this, FALSE); +	// clamp texture size to fit within actual size of floater after attempting resize +	client_width = llmin(client_width, mRect.getWidth() - horiz_pad); +	client_height = llmin(client_height, mRect.getHeight() - PREVIEW_HEADER_SIZE - (2 * CLIENT_RECT_VPAD) - LLPANEL_BORDER_WIDTH - info_height); + +	LLRect window_rect(0, mRect.getHeight(), mRect.getWidth(), 0); +	window_rect.mTop -= (PREVIEW_HEADER_SIZE + CLIENT_RECT_VPAD); +	window_rect.mBottom += PREVIEW_BORDER + button_height + CLIENT_RECT_VPAD + info_height + CLIENT_RECT_VPAD; + +	if (getHost()) +	{ +		// try to keep aspect ratio when hosted, as hosting view can resize without user input +		mClientRect.setLeftTopAndSize(window_rect.getCenterX() - (client_width / 2), window_rect.mTop, client_width, client_height); +	} +	else +	{ +		mClientRect.setLeftTopAndSize(LLPANEL_BORDER_WIDTH + PREVIEW_PAD + 6, +						mRect.getHeight() - (PREVIEW_HEADER_SIZE + CLIENT_RECT_VPAD), +						mRect.getWidth() - horiz_pad, +						client_height);  	}  } diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp index 046029ea1e..c4e166d68d 100644 --- a/indra/newview/llselectmgr.cpp +++ b/indra/newview/llselectmgr.cpp @@ -1278,21 +1278,30 @@ void LLSelectMgr::selectionSetImage(const LLUUID& imageid)  	{  		if (item)  		{ -			LLToolDragAndDrop::dropTextureAllFaces(objectp, -											item, -											LLToolDragAndDrop::SOURCE_AGENT, -											LLUUID::null); -		} -		else -		{ -			S32 num_faces = objectp->getNumTEs(); -			for( S32 face = 0; face < num_faces; face++ ) +			if (te == -1) // all faces +			{ +				LLToolDragAndDrop::dropTextureAllFaces(objectp, +													   item, +													   LLToolDragAndDrop::SOURCE_AGENT, +													   LLUUID::null); +			} +			else // one face  			{ -				// Texture picker defaults aren't inventory items -				// * Don't need to worry about permissions for them -				// * Can just apply the texture and be done with it. -				objectp->setTEImage(face, gImageList.getImage(imageid)); +				LLToolDragAndDrop::dropTextureOneFace(objectp, +													  te, +													  item, +													  LLToolDragAndDrop::SOURCE_AGENT, +													  LLUUID::null);  			} +		} +		 +		else // not an inventory item +		{ +			// Texture picker defaults aren't inventory items +			// * Don't need to worry about permissions for them +			// * Can just apply the texture and be done with it. +			objectp->setTEImage(te, gImageList.getImage(imageid)); +  			objectp->sendTEUpdate();  		}  	} diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index 282de24060..04b5fe7340 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -126,10 +126,13 @@  #include "viewer.h"  #include "llmediaengine.h"  #include "llfasttimerview.h" -#include "llmozlib.h"  #include "llweb.h"  #include "llfloaterhtml.h" +#if LL_LIBXUL_ENABLED +#include "llmozlib.h" +#endif // LL_LIBXUL_ENABLED +  #if LL_WINDOWS  #include "llwindebug.h"  #include "lldxhardware.h" diff --git a/indra/newview/lltoolfocus.cpp b/indra/newview/lltoolfocus.cpp index 2d1cb9c493..c439797c47 100644 --- a/indra/newview/lltoolfocus.cpp +++ b/indra/newview/lltoolfocus.cpp @@ -69,13 +69,13 @@ LLToolCamera::~LLToolCamera()  // virtual  void LLToolCamera::handleSelect()  { -	gFloaterTools->setStatusText("Click and drag to change view"); +	if (gFloaterTools) gFloaterTools->setStatusText("Click and drag to change view");  }  // virtual  void LLToolCamera::handleDeselect()  { -	gFloaterTools->setStatusText(""); +	if (gFloaterTools) gFloaterTools->setStatusText("");  //	gAgent.setLookingAtAvatar(FALSE);  } diff --git a/indra/newview/llviewerdisplay.cpp b/indra/newview/llviewerdisplay.cpp index 413a3ac819..9c3643128b 100644 --- a/indra/newview/llviewerdisplay.cpp +++ b/indra/newview/llviewerdisplay.cpp @@ -155,11 +155,8 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield)  		// Clean up memory the pools may have allocated  		if (rebuild)  		{ -			if (!gViewerWindow->renderingFastFrame()) -			{ -				gFrameStats.start(LLFrameStats::REBUILD); -				gPipeline.rebuildPools(); -			} +			gFrameStats.start(LLFrameStats::REBUILD); +			gPipeline.rebuildPools();  		}  		return;   	} @@ -359,14 +356,6 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield)  		}  	} -	if (rebuild) -	{ -		if (gViewerWindow->renderingFastFrame()) -		{ -			gFrameStats.start(LLFrameStats::STATE_SORT); -			gFrameStats.start(LLFrameStats::REBUILD); -		} -	}  	/////////////////////////////  	// @@ -452,7 +441,7 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield)  		gPipeline.updateCull();  		stop_glerror(); -		if (rebuild && !gViewerWindow->renderingFastFrame()) +		if (rebuild)  		{  			LLFastTimer t(LLFastTimer::FTM_REBUILD); @@ -516,12 +505,7 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield)  	//	glPopMatrix();  	//} -	if (gViewerWindow->renderingFastFrame()) -	{ -		gFrameStats.start(LLFrameStats::RENDER_SYNC); -		gFrameStats.start(LLFrameStats::RENDER_GEOM); -	} -	else if (!(gLogoutRequestSent && gHaveSavedSnapshot)  +	if (!(gLogoutRequestSent && gHaveSavedSnapshot)   			&& !gRestoreGL  			&& !gDisconnected)  	{ @@ -566,7 +550,7 @@ void render_ui_and_swap()  		if (gPipeline.hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_UI))  		{  			LLFastTimer t(LLFastTimer::FTM_RENDER_UI); -			if (!gViewerWindow->renderingFastFrame() && !gDisconnected) +			if (!gDisconnected)  			{  				render_ui_3d();  #ifndef LL_RELEASE_FOR_DOWNLOAD @@ -587,8 +571,6 @@ void render_ui_and_swap()  			gViewerWindow->mWindow->swapBuffers();  		}  	} - -	gViewerWindow->finishFirstFastFrame();  }  void render_ui_3d() diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 79db7b72cc..1b39c5bf7e 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -1150,15 +1150,13 @@ LLViewerWindow::LLViewerWindow(  	mSuppressToolbox( FALSE ),  	mHideCursorPermanent( FALSE ),  	mPickPending(FALSE), -	mIgnoreActivate( FALSE ), -	mRenderFullFrame(FALSE) +	mIgnoreActivate( FALSE )  {  	// Default to application directory.  	strcpy(LLViewerWindow::sSnapshotBaseName, "Snapshot");	/* Flawfinder: ignore */  	strcpy(LLViewerWindow::sMovieBaseName, "SLmovie");	/* Flawfinder: ignore */  	LLViewerWindow::sSnapshotDir[0] = '\0'; -	mFastFrameTimer.stop();  	// create window  	mWindow = LLWindowManager::createWindow( @@ -1250,7 +1248,6 @@ LLViewerWindow::LLViewerWindow(  	// Create container for all sub-views  	mRootView = new LLRootView("root", mVirtualWindowRect, FALSE); -	mRootView->setRenderInFastFrame(FALSE);  	if (!gNoRender)  	{ @@ -3126,8 +3123,6 @@ void LLViewerWindow::performPick()  		return;  	} -	finishFastFrame(); -  	mPickPending = FALSE;  	U32	te_offset = NO_FACE; @@ -3413,45 +3408,6 @@ void LLViewerWindow::analyzeHit(  	//llinfos << "DEBUG Hit Nothing " << llendl;  } - -void LLViewerWindow::requestFastFrame(LLView *view)  -{  -	if (!mPickPending &&  -		mWindow->getSwapMethod() != LLWindow::SWAP_METHOD_UNDEFINED && -		gStartupState >= STATE_STARTED &&  -		gSavedSettings.getBOOL("RenderFastUI") &&  -		!gbCapturing) -	{ -		if (!mFastFrameTimer.getStarted()) -		{ -			// we're double buffered, so when first requesting a fast ui update  -			// we need to render the scene again so that the front and back buffers -			// are synced -			mRenderFullFrame = TRUE; -		} -		// calculation new expiration time and reset timer -		F32 expiration; -		if (mFastFrameTimer.hasExpired()) -		{ -			expiration =  FAST_FRAME_INCREMENT; -		} -		else -		{ -			expiration = llmin(MAX_FAST_FRAME_TIME, mFastFrameTimer.getTimeToExpireF32() + FAST_FRAME_INCREMENT); -		} - -		mFastFrameTimer.start(); -		mFastFrameTimer.setTimerExpirySec(expiration); - -		LLView::sFastFrameView = view->getRootMostFastFrameView(); -		if (!LLView::sFastFrameView) -		{ -			LLView::sFastFrameView = view; -		} -	} -} - -  // Returns unit vector relative to camera  // indicating direction of point on screen x,y  LLVector3 LLViewerWindow::mouseDirectionGlobal(const S32 x, const S32 y) const @@ -3925,9 +3881,6 @@ BOOL LLViewerWindow::rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_hei  		return FALSE;  	} -	// IW 3/5/04 We don'a wan' nunna yer fest frumes har! -	finishFastFrame(); -  	// PRE SNAPSHOT  	glClear(GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT | GL_STENCIL_BUFFER_BIT); diff --git a/indra/newview/llviewerwindow.h b/indra/newview/llviewerwindow.h index 251c0155b6..0097a00b7a 100644 --- a/indra/newview/llviewerwindow.h +++ b/indra/newview/llviewerwindow.h @@ -205,12 +205,6 @@ public:  	LLViewerObject*	getObjectUnderCursor(const F32 depth = 16.0f); -	void			requestFastFrame(LLView* view); -	BOOL			renderingFastFrame() { return mFastFrameTimer.getStarted() && !firstFastFrame(); } -	void			finishFastFrame() { mFastFrameTimer.stop(); mRenderFullFrame = FALSE; } -	BOOL			firstFastFrame() { return mRenderFullFrame; } -	void			finishFirstFastFrame() { mRenderFullFrame = FALSE; } -  	// Returns a pointer to the last object hit  	LLViewerObject	*lastObjectHit();  	LLViewerObject  *lastNonFloraObjectHit(); @@ -326,8 +320,6 @@ protected:  	static char		sMovieBaseName[LL_MAX_PATH];		/* Flawfinder: ignore */  	BOOL			mIgnoreActivate; -	LLFrameTimer	mFastFrameTimer; -	BOOL			mRenderFullFrame;  	U8*				mPickBuffer;  };	 | 
