Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
libjitsi
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ZRTP
libjitsi
Commits
185d276a
Commit
185d276a
authored
12 years ago
by
Lyubomir Marinov
Browse files
Options
Downloads
Patches
Plain Diff
Restores black background in video calls (which got recently broken/removed).
parent
52ade675
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/org/jitsi/util/swing/VideoContainer.java
+28
-8
28 additions, 8 deletions
src/org/jitsi/util/swing/VideoContainer.java
with
28 additions
and
8 deletions
src/org/jitsi/util/swing/VideoContainer.java
+
28
−
8
View file @
185d276a
...
...
@@ -9,8 +9,6 @@
import
java.awt.*
;
import
java.awt.event.*
;
import
org.jitsi.util.*
;
/**
* Implements a <tt>Container</tt> for video/visual <tt>Component</tt>s.
* <tt>VideoContainer</tt> uses {@link VideoLayout} to layout the video/visual
...
...
@@ -29,10 +27,10 @@ public class VideoContainer
private
static
final
long
serialVersionUID
=
0L
;
/**
* The default background color.
* The default background color of <tt>VideoContainer</tt> when it contains
* <tt>Component</tt> instances other than {@link #noVideoComponent}.
*/
public
static
final
Color
DEFAULT_BACKGROUND_COLOR
=
OSUtils
.
IS_MAC
?
Color
.
BLACK
:
null
;
public
static
final
Color
DEFAULT_BACKGROUND_COLOR
=
Color
.
BLACK
;
private
int
inAddOrRemove
;
...
...
@@ -64,6 +62,9 @@ public VideoContainer(Component noVideoComponent, boolean conference)
this
.
noVideoComponent
=
noVideoComponent
;
if
(
DEFAULT_BACKGROUND_COLOR
!=
null
)
setBackground
(
DEFAULT_BACKGROUND_COLOR
);
addContainerListener
(
new
ContainerListener
()
{
...
...
@@ -176,10 +177,29 @@ private void exitAddOrRemove()
private
void
onContainerEvent
(
ContainerEvent
ev
)
{
synchronized
(
syncRoot
)
try
{
if
(
inAddOrRemove
!=
0
)
validateAndRepaint
=
true
;
if
(
DEFAULT_BACKGROUND_COLOR
!=
null
)
{
int
componentCount
=
getComponentCount
();
if
((
componentCount
==
1
)
&&
(
getComponent
(
0
)
==
VideoContainer
.
this
.
noVideoComponent
))
{
componentCount
=
0
;
}
setOpaque
(
componentCount
>
0
);
}
}
finally
{
synchronized
(
syncRoot
)
{
if
(
inAddOrRemove
!=
0
)
validateAndRepaint
=
true
;
}
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment