thanks Gregory,
i took a look at the classes, i saw the GSWindowDecorator @protocol, i am
proposing to extend the protocol with some helper methods to check if a
point is in a specific area of the decorations and as well used the same
methods in the current implementation:
https://github.com/gnustep/libs-gui/pull/124

let me know if this approach could make sense



On Thu, 16 Dec 2021 at 14:11, Gregory Casamento <greg.casame...@gmail.com>
wrote:

>
> So for the WaylandServer+Cursor.m code you might be able to do something
> similar.  GC
>
> On Thu, Dec 16, 2021 at 8:04 AM Gregory Casamento <
> greg.casame...@gmail.com> wrote:
>
>>
>> Please let me know if you have any questions.  Actually, allow me to
>> correct myself.  GSTheme is a class (a base class) that has methods to draw
>> for other widgets.  The way this works is that when a subclass of GSTheme
>> is loaded as a theme, these methods can be overridden.   This allows the
>> theme to change the drawing.  This is no different.
>>
>>
>> On Thu, Dec 16, 2021 at 7:45 AM Gregory Casamento <
>> greg.casame...@gmail.com> wrote:
>>
>>>
>>> If you take a quick look at GSTheme.h in gui you'll see a lot of classes
>>> to which we delegate the drawing.   I believe what you should do is create
>>> a similar class for GSStandardDecorationView that can be used to do the
>>> drawing for that class.  This way the class implemented in GSTheme.h will
>>> be the default that is used unless a theme is loaded.
>>>
>>>
>>> On Thu, Dec 16, 2021 at 2:25 AM Riccardo Canalicchio <
>>> riccardo.canalicc...@gmail.com> wrote:
>>>
>>>> Hello,
>>>> I am in the process of cleaning-up / refactoring the wayland backend
>>>> cursor handling and I am stuck on the window-resize and window-move logic.
>>>> The wayland implementations requires the window move and resize to be
>>>> handled by the compositors which means that in the cursor button handler
>>>> there should be the knowledge of the window decorations to understand if
>>>> the click is in the titlebar or resizebar to then trigger the appropriate
>>>> callbacks in the compositor.
>>>>
>>>> The current implementation that "works" has replicated the same logic
>>>> present in libs-gui GSStandardDecorationView, my concern is that this is
>>>> coupling the backend to a specific theme implementation which is not ideal:
>>>>
>>>> https://github.com/gnustep/libs-back/blob/master/Source/wayland/WaylandServer%2BCursor.m#L213
>>>>
>>>> Best would be if the theme is exposing some methods like:
>>>> pointInTitleBar or pointInResizeBar but I see that the base
>>>> interface GSWindowDecorationView doesn't have knowledge of titleBar or
>>>> resizeBar.
>>>>
>>>> How do you suggest to proceed?
>>>>
>>>> best,
>>>> Riccardo
>>>>
>>>
>>>
>>> --
>>> Gregory Casamento
>>> GNUstep Lead Developer / OLC, Principal Consultant
>>> http://www.gnustep.org - http://heronsperch.blogspot.com
>>> https://www.patreon.com/bePatron?u=352392 - Become a Patron
>>> https://gf.me/u/x8m3sx - My GNUstep GoFundMe
>>> https://teespring.com/stores/gnustep - Store
>>>
>>
>>
>> --
>> Gregory Casamento
>> GNUstep Lead Developer / OLC, Principal Consultant
>> http://www.gnustep.org - http://heronsperch.blogspot.com
>> https://www.patreon.com/bePatron?u=352392 - Become a Patron
>> https://gf.me/u/x8m3sx - My GNUstep GoFundMe
>> https://teespring.com/stores/gnustep - Store
>>
>
>
> --
> Gregory Casamento
> GNUstep Lead Developer / OLC, Principal Consultant
> http://www.gnustep.org - http://heronsperch.blogspot.com
> https://www.patreon.com/bePatron?u=352392 - Become a Patron
> https://gf.me/u/x8m3sx - My GNUstep GoFundMe
> https://teespring.com/stores/gnustep - Store
>

Reply via email to