fix case where pane divider is not redrawn after a leave event.
[ardour.git] / libs / gtkmm2ext / keyboard.cc
index fa44234d89683623c717f9b140571245c6024474..983edbd0cf0cde30bf4c4c52e2dc50af383aaeec 100644 (file)
@@ -57,9 +57,9 @@ guint Keyboard::delete_mod = GDK_SHIFT_MASK;
 guint Keyboard::insert_note_but = 1;
 guint Keyboard::insert_note_mod = GDK_CONTROL_MASK;
 
-#ifdef GTKOSX
+#ifdef __APPLE__
 
-uint Keyboard::PrimaryModifier = GDK_MOD2_MASK;   // Command
+uint Keyboard::PrimaryModifier = GDK_META_MASK|GDK_MOD2_MASK;   // Command
 guint Keyboard::SecondaryModifier = GDK_CONTROL_MASK; // Control
 guint Keyboard::TertiaryModifier = GDK_SHIFT_MASK; // Shift
 guint Keyboard::Level4Modifier = GDK_MOD1_MASK; // Alt/Option
@@ -112,6 +112,7 @@ bool Keyboard::bindings_changed_after_save_became_legal = false;
 map<string,string> Keyboard::binding_files;
 string Keyboard::_current_binding_name;
 string Keyboard::binding_filename_suffix = X_(".keys");
+Gtk::Window* Keyboard::pre_dialog_active_window = 0;
 
 /* set this to initially contain the modifiers we care about, then track changes in ::set_edit_modifier() etc. */
 GdkModifierType Keyboard::RelevantModifierKeyMask;
@@ -214,7 +215,7 @@ Keyboard::get_state (void)
 int
 Keyboard::set_state (const XMLNode& node, int /*version*/)
 {
-       const XMLProperty* prop;
+       XMLProperty const * prop;
 
        if ((prop = node.property ("copy-modifier")) != 0) {
                sscanf (prop->value().c_str(), "%d", &CopyModifier);
@@ -591,7 +592,7 @@ Keyboard::is_insert_note_event (GdkEventButton *ev)
 bool
 Keyboard::is_button2_event (GdkEventButton* ev)
 {
-#ifdef GTKOSX
+#ifdef __APPLE__
        return (ev->button == 2) ||
                ((ev->button == 1) &&
                 ((ev->state & Keyboard::button2_modifiers) == Keyboard::button2_modifiers));
@@ -701,8 +702,9 @@ Keyboard::read_keybindings (string const & path)
        XMLNodeList const& children = tree.root()->children();
 
        for (XMLNodeList::const_iterator i = children.begin(); i != children.end(); ++i) {
-               if ((*i)->name() == X_("Bindings")) {
-                       XMLProperty const* name = (*i)->property (X_("name"));
+               XMLNode const * child = *i;
+               if (child->name() == X_("Bindings")) {
+                       XMLProperty const* name = child->property (X_("name"));
                        if (!name) {
                                warning << _("Keyboard binding found without a name") << endmsg;
                                continue;