버그 - Beryl/Compiz, Swing, MToolkit

c-clef의 이미지

아시는 분도 있겠지만, Beryl/Compiz WM을 쓰면 Swing 어플을 쓰는 데 문제가 생깁니다. 참고:
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6429775
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6509038
http://forum.beryl-project.org/viewtopic.php?f=54&t=2420
http://blog.kfmes.com/tag/%EB%B2%A0%EB%A6%B4
이 문제를 해결하기 위해 XToolkit 대신 MToolkit을 쓰면 키보드 입력이 되지 않는 또다른 문제가 발생합니다. 이는 한 프레임에서 다른 프레임으로 포커스가 이동하면 나타납니다. 참고:
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6465038
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6598651
http://www.netbeans.org/issues/show_bug.cgi?id=84367
다음은 문제를 확인할 수 있는 간단한 코드입니다(다섯째 링크에 있습니다):

import java.awt.*;
import javax.swing.*;
 
class MultiFrame {
    MultiFrame(int x, int y) {
        JFrame frame = new JFrame("FrameTest");
        Container c = frame.getContentPane();
        c.setLayout(null);
        JTextArea textArea = new JTextArea();
        c.add(textArea);
        textArea.setBounds(0, 0, 200, 100);
        frame.setSize(200, 100);
        frame.setLocation(x, y);
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        frame.setVisible(true);
    }
 
    public static void main(String[] args) {
        System.setProperty("awt.toolkit", "sun.awt.motif.MToolkit");
        MultiFrame f1 = new MultiFrame(0, 0);
        MultiFrame f2 = new MultiFrame(200, 0);
    }
}
위 코드를 실행한 뒤 아무 프레임이나 잡고 키보드 입력이 되는 것을 확인한 후, 다른 프레임을 선택합니다. 그러면 더 이상 어떤 프레임에서도 키보드 입력을 할 수 없습니다.
저만의 문제일지도 모르겠지만 XToolkit을 써도 가끔 위 문제가 발생합니다(프레임 간 포커스를 매우 많이, 빠르게 바꾸면 생깁니다). 아직 해결되지 않은 문제 같은데, 어플 차원에서 해결할 수 있는 방법이 있습니까?

댓글 달기

Filtered HTML

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

BBCode

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param>
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

Textile

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • You can use Textile markup to format text.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Markdown

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • Quick Tips:
    • Two or more spaces at a line's end = Line break
    • Double returns = Paragraph
    • *Single asterisks* or _single underscores_ = Emphasis
    • **Double** or __double__ = Strong
    • This is [a link](http://the.link.example.com "The optional title text")
    For complete details on the Markdown syntax, see the Markdown documentation and Markdown Extra documentation for tables, footnotes, and more.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Plain text

  • HTML 태그를 사용할 수 없습니다.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 줄과 단락은 자동으로 분리됩니다.
댓글 첨부 파일
이 댓글에 이미지나 파일을 업로드 합니다.
파일 크기는 8 MB보다 작아야 합니다.
허용할 파일 형식: txt pdf doc xls gif jpg jpeg mp3 png rar zip.
CAPTCHA
이것은 자동으로 스팸을 올리는 것을 막기 위해서 제공됩니다.