From 64deccff7223f93b3418b74750729d52fcd6ef75 Mon Sep 17 00:00:00 2001 From: Brian Hinz Date: Mon, 18 Feb 2013 21:28:07 +0000 Subject: r5037 was not quite right. Both the viewport and scrollbar background colors were JRE dependent. git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@5042 3789f03b-4d11-0410-bbf8-ca57d06f2519 --- java/com/tigervnc/vncviewer/DesktopWindow.java | 5 ++--- java/com/tigervnc/vncviewer/Viewport.java | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) (limited to 'java') diff --git a/java/com/tigervnc/vncviewer/DesktopWindow.java b/java/com/tigervnc/vncviewer/DesktopWindow.java index 0fcfcb11..38dc2457 100644 --- a/java/com/tigervnc/vncviewer/DesktopWindow.java +++ b/java/com/tigervnc/vncviewer/DesktopWindow.java @@ -2,7 +2,7 @@ * Copyright (C) 2006 Constantin Kaplinsky. All Rights Reserved. * Copyright (C) 2009 Paul Donohue. All Rights Reserved. * Copyright (C) 2010, 2012 D. R. Commander. All Rights Reserved. - * Copyright (C) 2011-2012 Brian P. Hinz + * Copyright (C) 2011-2013 Brian P. Hinz * * This is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -55,8 +55,7 @@ class DesktopWindow extends JPanel implements public DesktopWindow(int width, int height, PixelFormat serverPF, CConn cc_) { cc = cc_; setSize(width, height); - setBackground(Color.BLACK); - setOpaque(true); + setOpaque(false); GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment(); GraphicsDevice gd = ge.getDefaultScreenDevice(); diff --git a/java/com/tigervnc/vncviewer/Viewport.java b/java/com/tigervnc/vncviewer/Viewport.java index ba29e0ac..e8793a1b 100644 --- a/java/com/tigervnc/vncviewer/Viewport.java +++ b/java/com/tigervnc/vncviewer/Viewport.java @@ -1,5 +1,5 @@ /* Copyright (C) 2002-2005 RealVNC Ltd. All Rights Reserved. - * Copyright (C) 2011-2012 Brian P. Hinz + * Copyright (C) 2011-2013 Brian P. Hinz * Copyright (C) 2012 D. R. Commander. All Rights Reserved. * * This is free software; you can redistribute it and/or modify @@ -43,6 +43,7 @@ public class Viewport extends JFrame UIManager.getDefaults().put("ScrollPane.ancestorInputMap", new UIDefaults.LazyInputMap(new Object[]{})); sp = new JScrollPane(); + sp.getViewport().setBackground(Color.BLACK); sp.setBorder(BorderFactory.createEmptyBorder(0,0,0,0)); getContentPane().add(sp); addWindowFocusListener(new WindowAdapter() { @@ -107,7 +108,6 @@ public class Viewport extends JFrame } if (!cc.fullScreen) setLocation(x, y); - getContentPane().setBackground(Color.BLACK); } public static Window getFullScreenWindow() { -- cgit v1.2.3