[MSEide-MSEgui-talk] Global hotkeys in MSE ?

2022-07-08 Thread Alexander via mseide-msegui-talk
Hi,

Thanx for transparency in MSE !

As about add (or implement) global hotkeys in MSE ?

In Galaxy Organizer version 1 is implemented global hotkeys.

In GNU/Linux is similar function XGrabKey and small working example:

// 
https://stackoverflow.com/questions/30994628/why-does-xgrabkey-return-badrequest

uses
xlib,
keysym,
x;

var
d :  PXDisplay;
root : TWindow;
keycode, rv : Int64;
evt : TXEvent;

begin
d := XOpenDisplay(nil);
root := DefaultRootWindow(d);
keycode := XKeysymToKeycode(d, XK_BackSpace);

rv := XGrabKey(d, keycode, AnyModifier, root, 1, GrabModeAsync, GrabModeAsync);
writeln('XGrabKey returned');
writeln(rv);

while true do begin
XNextEvent(d, @evt);
writeln('Got event');
writeln(evt._type);
end;
end.

If try just implement it in MSE as is occur troubles.

I try use d := msedisplay; instead d := XOpenDisplay(nil); ,
Try use:

//root := window.winid;
//root := DefaultRootWindow(d);
root := gui_getrootwindow(window.winid);

in mainfo oncreated and try
handle it in onkeyup and onapplicationevent

In onapplicationevent more correctly handled.
In onkeyup buggy.

Good Luck,
Alexander


___
mseide-msegui-talk mailing list
mseide-msegui-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk


Re: [MSEide-MSEgui-talk] Transparent background of form.

2022-07-08 Thread Sieghard via mseide-msegui-talk
Hallo Fred van Stappen,

vous ecrit au Wed, 15 Jun 2022 13:05:59 +:
Even thiugh that's aome time since, I'm only now able to give some
feedback.

> For example myform.optionswindow := [wo_ellipse] will give a form
> with ellipse shape,  myform.optionswindow := [wo_roundrect] will give
> a form with rounded rectangle shape.

Well, I tried this (where the rounded rectangle shape is specified by
"wo_rounded" now) and also your other additions to the window options,
"wo_alwaysontop" and "wo_inalldesktops" (which should, IMO, be rather
named "wo_onalldesktops", because a desktop is a place to put something
ON).
They all work nicely, when specified in the IDE, and do what they''re
supposed to do. But - and IMO, that's a BIG but - they CANNOT normally
be modified when the program runs. It took me (quite) some time to find
a way to switch these settings dynamically, which I wanted to do for
the "MSEclock" demo program. After persuing quite some detours, I found
a method to achieve this, though it's not really automatic. After
changing such an option, you have to call the method "RecreateWindow"
of the top window of the program. Nicely enogh, that doesn't produce
any weird visual effects, so this is a viable method to achieve the
desired effect.
Using these functions, I put together a new version of the "MSclock"
demo, featuring an "alway on top" mode, an "on all desktops" mode and
the ability to switch between a normal and a frameless rounded window,
all settable individually. It's available as usual on my web site, mse
download area.
In addition, I did correct an omission in the "fontlist" unit, which
did assume that it would be compiled using the fontlib library. THis
has to be switched on by the symbol "useLibFontConfig" now, otherwise
it will use the "fc-list" external program as before.
This is also included in the latest version of the "ideU_fonts_284.zip"
ideU variant, now upgraded to version 2.8.4 of ideU.
In addition, I present a new collection of modifications to the msegui
library, contained in the file "mseide-msegui-shadow.zip".
Most of them are concerned with getting rid of superfluous "ifdef
mse_dynpo" statements, using the available compatibility definitions.
But there are a couple amendments for compiler warnings and notes, too.
And there is a modified version of the "kernel/linux/meguiintf.pas"
unit that addresses a quirk I found with the "wo_inalldesktops" option.
Setting this option also set the "on top" property of a window, which
couldn't be reset independendly any more. Commenting aut the "wo_dock"
option set along with "wo_inalldesktops" before remedied this.
I wonder what the purpose of this other setting might have been -
perhaps this might require another modification.
As another aside, I realized that the latest corrected version of the
"POtoMO" unit (using prime numbers for the hash storage area size)
didn't make it into the latest release (4.5.8) of the "msegui" library.
That's somewhat unfortunate since the old version had the potential
to hang in an endless loop when building the hash table for a new .mo
file. This has been remedied quite some time already.

I hope you might find the time to go over all this - as liitle new
stuff it is, it will take some time, I realize.
I hope you might find it useful and can make use of the stuff provided.

Best wishes.

-- 
(Weitergabe von Adressdaten, Telefonnummern u.ä. ohne Zustimmung
nicht gestattet, ebenso Zusendung von Werbung oder ähnlichem)
---
Mit freundlichen Grüßen, S. Schicktanz
---



___
mseide-msegui-talk mailing list
mseide-msegui-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk