Fix Solaris compiler errors "Cannot cast from void* to integer of smaller size"

This commit is contained in:
Paul Cornett
2020-10-23 19:42:24 -07:00
parent ba4df6d996
commit 0a70d3241d
2 changed files with 5 additions and 4 deletions

View File

@@ -101,7 +101,7 @@ static gboolean wxapp_idle_callback(gpointer)
}
// 0: no change, 1: focus in, 2: focus out
static int gs_focusChange;
static wxUIntPtr gs_focusChange;
extern "C" {
static gboolean
@@ -109,7 +109,7 @@ wx_focus_event_hook(GSignalInvocationHint*, unsigned, const GValue* param_values
{
// If focus change on TLW
if (GTK_IS_WINDOW(g_value_peek_pointer(param_values)))
gs_focusChange = GPOINTER_TO_INT(data);
gs_focusChange = wxUIntPtr(data);
return true;
}

View File

@@ -269,13 +269,14 @@ selection_handler( GtkWidget *WXUNUSED(widget),
if ( !data )
return;
unsigned timestamp = unsigned(wxUIntPtr(signal_data));
// ICCCM says that TIMESTAMP is a required atom.
// In particular, it satisfies Klipper, which polls
// TIMESTAMP to see if the clipboards content has changed.
// It shall return the time which was used to set the data.
if (gtk_selection_data_get_target(selection_data) == g_timestampAtom)
{
guint timestamp = GPOINTER_TO_UINT (signal_data);
gtk_selection_data_set(selection_data,
GDK_SELECTION_TYPE_INTEGER,
32,
@@ -295,7 +296,7 @@ selection_handler( GtkWidget *WXUNUSED(widget),
wxString::FromAscii(wxGtkString(gdk_atom_name(gtk_selection_data_get_target(selection_data)))).c_str(),
wxString::FromAscii(wxGtkString(gdk_atom_name(gtk_selection_data_get_data_type(selection_data)))).c_str(),
wxString::FromAscii(wxGtkString(gdk_atom_name(gtk_selection_data_get_selection(selection_data)))).c_str(),
GPOINTER_TO_UINT( signal_data )
timestamp
);
if ( !data->IsSupportedFormat( format ) )