And remove all the complicated handling code entirely. This makes
GimpTransformTool a lot less complex. As a nice side effect, the
preview is now always 100% in sync with the grid and handles.
This was only there to make sure XOR drawing works, and is now
complete overhead since cairo drawing is done *in* expose, and not in
some hack around it.
Spit warnings in the functions if grabbing fails and return a boolean
success value. Bail out in the callers upon grab failure instead of
assuming that grabbing always succeeds and running into an
inconsistent state that can cause all sorts of problems.
- replace gimp_display_shell_selection_control() by undraw() and restart()
which actually say what they are doing
- remove enum GimpSelectionControl
- replace GimpImage::selection_control() by ::selection_invalidate()
because none of the other enum values was used any longer
which is the last bit of non-item drawing of stuff that is not
somehow the image itself... wheee!
This involves reverting commit
6bce0641d4 and adding back all the
vectors handlers that were in gimpdisplayshell-callbacks.c before.
Change the callbacks to manage proxy items for all the image's
vectors.
- Add signals GimpImage::guide_added(), removed() and moved()
- Remove singal GimpImage::update_guide()
- Adapt core code to emit the new signals instead of update_guide()
- Have the shell connect to the new signals and update guide canvas
items as needed
- Remove gimp_display_shell_draw_guides()
- Add GimpImage signal "sample-point-moved" and emit it when needed
- Let the shell connect to the sample point add, remove and move signals
and update the canvas items accordingly
- Remove gimp_display_shell_draw_sample_points()
- Invalidate the proper area when an item gets added or removed.
- Draw the kept canvas items instead of calling a draw tool function.
- The draw tool now sets its item on the shell.
Instead of blending the scaled image data onto the checkerboard and
then painting this image to the screen, render the image data into
an ARGB cairo image surface. Then paint a checkerboard on the canvas
and the image on top of it.
- app/widgets/gimptextstyleeditor.c: don't block all key events so
they can reach the canvas.
- app/display/gimpdisplayshell-callbacks.c: instead, ignore canvas key
events when the canvas has no focus.
This fixes navigating out of the text style editor with TAB, moving
focus to the canvas. I have no clue why navigating *between* the
widgets in the style editor doesn't work.
because it's sealed and deprecated. I don't remember why this code was
there at all (it should never be needed), so I added warnings that go
off if the widget's focus state doesn't match the received event.
and as a "side effect", speed up rendering the image significantly:
- disable double buffering on the canvas widget.
- implement background clearing ourselves (needed after turning off
double buffering).
- remove any fiddling with clipping regions on the tool drawing GCs
and pull the pause/resume code out of the actual image expose
function.
- if there are overlay widgets on the canvas, implement double
buffering manually to aviod flicker, but do it in a way that keeps
pausing/resuming the active tool *outside* the double buffered
drawing.