summaryrefslogtreecommitdiff
path: root/src/corelib
diff options
context:
space:
mode:
authorgraemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf>2007-08-07 09:51:23 +0000
committergraemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf>2007-08-07 09:51:23 +0000
commit27b4260ca539231514aa053706c060eff1568695 (patch)
tree6f36651eb45d5b2c163eaeda21a0474eb84a6be4 /src/corelib
parentf11fffeb438a1d3457629d183fe96657d12c9546 (diff)
downloadfpGUI-27b4260ca539231514aa053706c060eff1568695.tar.xz
* Fixed a minor bug where the CoreLib examples did not show the main window
Diffstat (limited to 'src/corelib')
-rw-r--r--src/corelib/x11/gfx_x11.pas33
1 files changed, 32 insertions, 1 deletions
diff --git a/src/corelib/x11/gfx_x11.pas b/src/corelib/x11/gfx_x11.pas
index 65d14754..fce95e78 100644
--- a/src/corelib/x11/gfx_x11.pas
+++ b/src/corelib/x11/gfx_x11.pas
@@ -2,7 +2,7 @@ unit gfx_x11;
{$mode objfpc}{$H+}
-{$Define DEBUG}
+{.$Define DEBUG}
interface
@@ -615,6 +615,36 @@ var
rfds: TFDSet;
xfd: integer;
KeySym: TKeySym;
+
+ // debug purposes only
+ procedure PrintKeyEvent(const event: TXEvent);
+ var
+ keysym: TKeySym;
+ compose_status: TXComposeStatus;
+ length: integer;
+ s: string[10];
+ begin
+ case event._type of
+ X.KeyPress:
+ begin
+ write('*** KeyPress ');
+ end;
+ X.KeyRelease:
+ begin
+ write('*** KeyRelease ');
+ end;
+ else
+ begin
+ writeln('not a key event ');
+ end;
+ end;
+ length := XLookupString(@event, @s[1], 9, @keysym, @compose_status);
+ SetLength(s, length);
+ if((length > 0) and (length <=9)) then
+ writeln('result of xlookupstring [' + s + ']');
+ writeln(Format('*** keysym [%s] ', [XKeysymToString(keysym)]));
+ end;
+
begin
xfd := XConnectionNumber(display);
@@ -643,6 +673,7 @@ begin
exit;
// WriteLn('Event ',GetXEventName(ev._type),': ', ev._type,' window: ', ev.xany.window);
+// PrintKeyEvent(ev); { debug purposes only }
case ev._type of
X.KeyPress,