バグ #1527 » 0001-gtk3-change-pointer-2.patch
plugin/gtk3/widget/miraclepainter.rb | ||
---|---|---|
283 | 283 |
textselector_select(*main_pos_to_index_forclick(x, y)[1..2]) |
284 | 284 | |
285 | 285 |
# change cursor shape |
286 |
window.cursor = Gdk::Cursor.new(cursor_name_of(x, y))
|
|
286 |
set_cursor(cursor_name_of(x, y))
|
|
287 | 287 |
false # propagate event |
288 | 288 |
end |
289 | 289 | |
... | ... | |
297 | 297 |
iob_main_leave |
298 | 298 |
textselector_release |
299 | 299 |
# restore cursor shape |
300 |
window.cursor = nil
|
|
300 |
set_cursor('default')
|
|
301 | 301 |
false # propagate event |
302 | 302 |
end |
303 | 303 | |
... | ... | |
695 | 695 |
end |
696 | 696 |
end |
697 | 697 | |
698 |
# _name_ に対応するマウスカーソルに変更する。 |
|
699 |
# ==== Args |
|
700 |
# [name] カーソルの名前(String) |
|
701 |
private def set_cursor(name) |
|
702 |
type = |
|
703 |
case name |
|
704 |
when 'pointer' |
|
705 |
:hand2 |
|
706 |
when 'text' |
|
707 |
:xterm |
|
708 |
else |
|
709 |
:left_ptr |
|
710 |
end |
|
711 |
window.cursor = Gdk::Cursor.new(type) |
|
712 |
self |
|
713 |
end |
|
714 | ||
698 | 715 |
def gb_foot |
699 | 716 |
self.class.gb_foot |
700 | 717 |
end |