cosmetic + avoid unneeded App::instance()->display() calls
This commit is contained in:
parent
a90fe37f9a
commit
df0c942aa2
2 changed files with 41 additions and 45 deletions
|
@ -22,7 +22,7 @@
|
|||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
|
||||
// $Id: ImageControl.cc,v 1.15 2004/09/09 21:13:10 akir Exp $
|
||||
// $Id: ImageControl.cc,v 1.16 2004/09/10 16:41:30 akir Exp $
|
||||
|
||||
#include "ImageControl.hh"
|
||||
|
||||
|
@ -343,10 +343,10 @@ void ImageControl::getGradientBuffers(unsigned int w,
|
|||
|
||||
|
||||
void ImageControl::installRootColormap() {
|
||||
XGrabServer(FbTk::App::instance()->display());
|
||||
|
||||
|
||||
Display *disp = FbTk::App::instance()->display();
|
||||
XGrabServer(disp);
|
||||
|
||||
bool install = true;
|
||||
int i = 0, ncmap = 0;
|
||||
Colormap *cmaps =
|
||||
|
@ -364,7 +364,7 @@ void ImageControl::installRootColormap() {
|
|||
XFree(cmaps);
|
||||
}
|
||||
|
||||
XUngrabServer(FbTk::App::instance()->display());
|
||||
XUngrabServer(disp);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
|
||||
// $Id: MenuIcon.cc,v 1.1 2004/06/07 22:28:39 fluxgen Exp $
|
||||
// $Id: MenuIcon.cc,v 1.2 2004/09/10 16:37:54 akir Exp $
|
||||
|
||||
#include "MenuIcon.hh"
|
||||
|
||||
|
@ -57,6 +57,7 @@ void MenuIcon::draw(FbDrawable &drawable,
|
|||
int x, int y,
|
||||
unsigned int width, unsigned int height) const {
|
||||
|
||||
Display *disp = FbTk::App::instance()->display();
|
||||
if (height - 2*theme.bevelWidth() != m_pixmap.height() &&
|
||||
!m_filename.empty()) {
|
||||
unsigned int scale_size = height - 2*theme.bevelWidth();
|
||||
|
@ -68,11 +69,8 @@ void MenuIcon::draw(FbDrawable &drawable,
|
|||
GC gc = theme.frameTextGC().gc();
|
||||
|
||||
// enable clip mask
|
||||
XSetClipMask(FbTk::App::instance()->display(),
|
||||
gc,
|
||||
m_mask.drawable());
|
||||
XSetClipOrigin(FbTk::App::instance()->display(),
|
||||
gc, x + theme.bevelWidth(), y + theme.bevelWidth());
|
||||
XSetClipMask(disp, gc, m_mask.drawable());
|
||||
XSetClipOrigin(disp, gc, x + theme.bevelWidth(), y + theme.bevelWidth());
|
||||
|
||||
drawable.copyArea(m_pixmap.drawable(),
|
||||
gc,
|
||||
|
@ -81,9 +79,7 @@ void MenuIcon::draw(FbDrawable &drawable,
|
|||
m_pixmap.width(), m_pixmap.height());
|
||||
|
||||
// restore clip mask
|
||||
XSetClipMask(FbTk::App::instance()->display(),
|
||||
gc,
|
||||
None);
|
||||
XSetClipMask(disp, gc, None);
|
||||
}
|
||||
FbTk::MenuItem::draw(drawable, theme, highlight, x, y, width, height);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue