Opened 11 years ago

Last modified 8 years ago

#1837 new bug

Implement Begin- and EndRectTracking() in the app_server

Reported by: stippi Owned by: stippi
Priority: normal Milestone: R1
Component: Servers/app_server Version: R1/pre-alpha1
Keywords: Cc:
Blocked By: Blocking:
Has a Patch: no Platform: All

Attachments (1)

RectTracking.patch (2.5 KB) - added by pulkomandy 8 years ago.
Patch for handling RectTracking. Misses some redrawing I don't know how to do from the server side.

Download all attachments as: .zip

Change History (7)

comment:1 Changed 11 years ago by korli

Description: modified (diff)

comment:2 Changed 11 years ago by stippi

Milestone: R1/alpha1R1

Doesn't have to be in the Alpha, I suppose.

comment:3 Changed 8 years ago by pulkomandy

I started playing around with that.

Basically, the code is working, but I'm not sure where to do the drawing. Is there a way on the app_server side to watch for mouse moves ? I didn't see anything in ServerWindow.cpp. If there isn't, how should it be done ? periodically checking if the mouse moved ? Again, is there some kind of loop somewhere where that could be done ?

Changed 8 years ago by pulkomandy

Attachment: RectTracking.patch added

Patch for handling RectTracking. Misses some redrawing I don't know how to do from the server side.

comment:4 Changed 8 years ago by pulkomandy

Has a Patch: set

comment:5 Changed 8 years ago by stippi

Unfortunately, the patch is not what I had in mind for the implementation. Also it is not complete, please read up on the functionality in the BeBook, there is a dragging mode which drags the rect at a fixed size, instead of resizing it. A drag rect operation is global, therefor it is misplaced in ServerWindow. The implementation should be beneath the Desktop class, ServerWindow should only forward the request to begin and end a session. Then Desktop should implement it probably in the MouseFilter, or better with a dedicated class for this purpose (attached to the filter chain on the fly). Then the dragged rect drawing should be implemented as a "transparent overlay" like the cursor is being rendered. A while ago I already started refactoring this stuff so the cursor is not something special, but there is a dynamic list of overlays (which in some configurations need to be hidden to draw something and than shown back on top of the drawing, it's complex, sorry). Your redrawing problems come from the problem that you can only invalidate what's inside the window that initiated the drag operation, but like I said it's supposed to be something global, i.e. the graphics overlay all windows on the screen.

Hope this helps. Please don't let this discourage you, I will be glad to assist you further. If it would be as simple as in your patch (no offense!), I would have implemented this long ago. But I am glad you started it!

comment:6 Changed 8 years ago by Charlie_X

Has a Patch: unset
Note: See TracTickets for help on using tickets.