[MSEide-MSEgui-talk] TrayWidget - popup is not showing if tray has frame

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

[MSEide-MSEgui-talk] TrayWidget - popup is not showing if tray has frame

Krzysztof
Hi Martin,

Look at attached demo. Popup is not showing when right click on tray
icon but if you remove frame (tcaptionframe) instance then it is ok.
Same without two_usedbus option. I noticed that framewidth has to be >
0

Regards

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
mseide-msegui-talk mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk

traypopup.7z (6K) Download Attachment
mse
Reply | Threaded
Open this post in threaded view
|

Re: [MSEide-MSEgui-talk] TrayWidget - popup is not showing if tray has frame

mse
Administrator
On Tuesday 02 January 2018 17:41:05 Krzysztof wrote:
> Hi Martin,
>
> Look at attached demo. Popup is not showing when right click on tray
> icon but if you remove frame (tcaptionframe) instance then it is ok.
> Same without two_usedbus option. I noticed that framewidth has to be >
> 0
>
Works for me with framewidth 2 and 0, see attachment. Are you still on a newer
KDE desktop?

Martin

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
mseide-msegui-talk mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk

traypopup1.png (3K) Download Attachment
traypopup.png (3K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [MSEide-MSEgui-talk] TrayWidget - popup is not showing if tray has frame

Krzysztof
2018-01-02 18:53 GMT+01:00 Martin Schreiber <[hidden email]>:
> Works for me with framewidth 2 and 0, see attachment. Are you still on a newer
> KDE desktop?

Yes, Linux Mint 18.3, KDE Plasma 5.8.8. If this is too much trouble, I
already handled it with OnPaint event:

procedure tmainfo.MyPaint(const sender: twidget; const acanvas: tcanvas);
begin
  acanvas.fillrect(sender.widgetrect, cl_red, cl_green);
end;

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
mseide-msegui-talk mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk
mse
Reply | Threaded
Open this post in threaded view
|

Re: [MSEide-MSEgui-talk] TrayWidget - popup is not showing if tray has frame

mse
Administrator


On 01/02/2018 07:11 PM, Krzysztof wrote:

> 2018-01-02 18:53 GMT+01:00 Martin Schreiber <[hidden email]>:
>> Works for me with framewidth 2 and 0, see attachment. Are you still on a newer
>> KDE desktop?
>
> Yes, Linux Mint 18.3, KDE Plasma 5.8.8. If this is too much trouble, I
> already handled it with OnPaint event:
>
> procedure tmainfo.MyPaint(const sender: twidget; const acanvas: tcanvas);
> begin
>   acanvas.fillrect(sender.widgetrect, cl_red, cl_green);
> end;
>
That fixes popup menu? IIRC xembed protocol is not fully supported in
KDE, they recommend to use DBUS StatusNotifierItem protocol but that
does not support to show a widget and isn't correctly implemented either...
https://marc.info/?l=kde-devel&m=147990949706920&w=2
https://marc.info/?l=kde-devel&m=149409641427288&w=2
https://www.mail-archive.com/kde-devel@.../msg09024.html
https://www.mail-archive.com/kde-devel@.../msg09128.html

Martin

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
mseide-msegui-talk mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk
mse
Reply | Threaded
Open this post in threaded view
|

Re: [MSEide-MSEgui-talk] TrayWidget - popup is not showing if tray has frame

mse
Administrator
In reply to this post by Krzysztof


On 01/02/2018 05:41 PM, Krzysztof wrote:
> Hi Martin,
>
> Look at attached demo. Popup is not showing when right click on tray
> icon but if you remove frame (tcaptionframe) instance then it is ok.
> Same without two_usedbus option. I noticed that framewidth has to be >
> 0
>
The problem is that KDE always reports mouse position 0:0 in _XEMBED
tray icon mode button press/release events -> the mouse click is not in
client area -> no popup event. Please make a bug report at KDE.
Another problem is that it often reports wrong tray icon positions at
the second and later starts of the program. This also should be reported.

Martin

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
mseide-msegui-talk mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk
Reply | Threaded
Open this post in threaded view
|

Re: [MSEide-MSEgui-talk] TrayWidget - popup is not showing if tray has frame

fredvs
If I may...

Since MSE has now also a huge assistive interface (and also because no other
has it), I am not so sure that a MSE Window Manager would be "a one more
Window Manager" like you said, Martin, a few years ago,

JWM (Joe Window Manager) has accepted in his to become assistive but... no
movement...

--> https://github.com/joewing/jwm/issues/331

And I am not talking about the tray-icons problems with lot of Window
Manager.

...

Fre;D





--
Sent from: http://mseide-msegui-talk.13964.n8.nabble.com/

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
mseide-msegui-talk mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk
Reply | Threaded
Open this post in threaded view
|

Re: [MSEide-MSEgui-talk] TrayWidget - popup is not showing if tray has frame

Krzysztof
In reply to this post by mse
2018-01-03 6:06 GMT+01:00 Martin Schreiber <[hidden email]>:
> That fixes popup menu?

Yes. Just removed normal frame reference from object inspector and
added ttraywidget.OnPaint event with:

procedure tmainfo.PaintTray(const sender: twidget; const acanvas: tcanvas);
begin
  acanvas.linewidth := 4;
  acanvas.fillrect(sender.clientrect,
MCSkinMO.GetMCColor(clBackground), MCSkinMO.GetMCColor(clIcon));
  if IconMng.imlstTray.count>0 then
    IconMng.imlstTray.paint(acanvas,0,sender.clientrect,
[al_xcentered,al_ycentered]);
end;

Can't understand why making frame from object inspector disable popup
menu. I'll not report it yet on KDE since now it is working perfect
and I'm not sure if I'm able to explain exactly what is going on in
backend

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
mseide-msegui-talk mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk
mse
Reply | Threaded
Open this post in threaded view
|

Re: [MSEide-MSEgui-talk] TrayWidget - popup is not showing if tray has frame

mse
Administrator
On Wednesday 03 January 2018 14:47:53 Krzysztof wrote:
> 2018-01-03 6:06 GMT+01:00 Martin Schreiber <[hidden email]>:
> > That fixes popup menu?
>
> Yes. Just removed normal frame reference from object inspector and
> added ttraywidget.OnPaint event with:
>
Ah, OK. That means removing the non client frame fixes the popup menu.
[...]
>
> Can't understand why making frame from object inspector disable popup
> menu.

Because it adds a "non client area" frame. KDE always reports a mouse click
position x=0, y=0 independent of the actual mouse position so it is not
possible to click in client area of the tray widget if the widget point 0:0
is not in client area.

Martin

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
mseide-msegui-talk mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk