GTK3: fix color chooser.
On GTK2, even with a modal grab, mouse button events go through to the text window. On GTK3 this is not the case.
This commit is contained in:
parent
89da072427
commit
bd2da7fe3f
@ -416,13 +416,17 @@ public:
|
|||||||
if(!_entry.is_visible()) {
|
if(!_entry.is_visible()) {
|
||||||
_entry.show();
|
_entry.show();
|
||||||
_entry.grab_focus();
|
_entry.grab_focus();
|
||||||
|
#ifndef HAVE_GTK3
|
||||||
_entry.add_modal_grab();
|
_entry.add_modal_grab();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void stop_editing() {
|
void stop_editing() {
|
||||||
|
#ifndef HAVE_GTK3
|
||||||
if(_entry.is_visible())
|
if(_entry.is_visible())
|
||||||
_entry.remove_modal_grab();
|
_entry.remove_modal_grab();
|
||||||
|
#endif
|
||||||
_entry.hide();
|
_entry.hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user