Skip to content

Commit c670f4e

Browse files
committed
[GTK] Safeguard ATK to not be used on GTK 4.x
It simply doesn't exist there thus causes a number of CRITICAL/WARNING.
1 parent 8e220ad commit c670f4e

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

bundles/org.eclipse.swt/Eclipse SWT Accessibility/gtk/org/eclipse/swt/accessibility/AccessibleObject.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4649,6 +4649,7 @@ void removeRelation (int type, Accessible target) {
46494649
}
46504650

46514651
void selectionChanged () {
4652+
if(GTK.GTK4) return; //TODO investigate proper way for GTK 4.x
46524653
OS.g_signal_emit_by_name (atkHandle, ATK.selection_changed);
46534654
}
46544655

@@ -4862,6 +4863,7 @@ void sendEvent(int event, Object eventData, int childID) {
48624863
}
48634864

48644865
void setFocus (int childID) {
4866+
if(GTK.GTK4) return; //TODO investigate proper way for GTK 4.x
48654867
updateChildren ();
48664868
AccessibleObject accObject = getChildByID (childID);
48674869
if (accObject != null) {
@@ -4871,10 +4873,12 @@ void setFocus (int childID) {
48714873
}
48724874

48734875
void textCaretMoved(int index) {
4876+
if(GTK.GTK4) return; //TODO investigate proper way for GTK 4.x
48744877
OS.g_signal_emit_by_name (atkHandle, ATK.text_caret_moved, index);
48754878
}
48764879

48774880
void textChanged(int type, int startIndex, int length) {
4881+
if(GTK.GTK4) return; //TODO investigate proper way for GTK 4.x
48784882
if (type == ACC.TEXT_DELETE) {
48794883
OS.g_signal_emit_by_name (atkHandle, ATK.text_changed_delete, startIndex, length);
48804884
} else {
@@ -4883,6 +4887,7 @@ void textChanged(int type, int startIndex, int length) {
48834887
}
48844888

48854889
void textSelectionChanged() {
4890+
if(GTK.GTK4) return; //TODO investigate proper way for GTK 4.x
48864891
OS.g_signal_emit_by_name (atkHandle, ATK.text_selection_changed);
48874892
}
48884893

0 commit comments

Comments
 (0)