Revert "require at least gtk3 3.20.0 to build and run gtk3 bits"
Linux-deb-x86_64_56-lhm-ubuntu-trusty is at 3.18, not defunct
Linux-Ubuntu-x86_64_54-TDE
This reverts commit 75e828cad5
.
Change-Id: I8939e4bb1876186f5ed75b3ad4c2626e37e4c81c
This commit is contained in:
@@ -131,7 +131,9 @@ public:
|
||||
|
||||
virtual void GetResolution(sal_Int32& rDPIX, sal_Int32& rDPIY) override;
|
||||
|
||||
GtkStyleContext* createStyleContext(GtkControlPart ePart);
|
||||
GtkStyleContext* createStyleContext(gtk_widget_path_iter_set_object_nameFunc set_object_name, GtkControlPart ePart);
|
||||
GtkStyleContext* createNewContext(GtkControlPart ePart, gtk_widget_path_iter_set_object_nameFunc set_object_name);
|
||||
GtkStyleContext* createOldContext(GtkControlPart ePart);
|
||||
GtkStyleContext* makeContext(GtkWidgetPath *pPath, GtkStyleContext *pParent);
|
||||
private:
|
||||
GtkWidget *mpWindow;
|
||||
|
@@ -82,7 +82,7 @@ extern "C"
|
||||
XInitThreads();
|
||||
|
||||
#if GTK_CHECK_VERSION(3,0,0)
|
||||
if (gtk_minor_version < 20)
|
||||
if (gtk_minor_version < 18)
|
||||
{
|
||||
g_warning("require a newer gtk than 3.%d for theme expectations", gtk_minor_version);
|
||||
return nullptr;
|
||||
|
@@ -630,7 +630,12 @@ void GtkSalMenu::ShowCloseButton(bool bShow)
|
||||
"min-width: 18px;"
|
||||
"min-height: 18px;"
|
||||
"}";
|
||||
gtk_css_provider_load_from_data(pProvider, data, -1, nullptr);
|
||||
const gchar olddata[] = "* { "
|
||||
"padding: 0;"
|
||||
"margin-left: 8px;"
|
||||
"margin-right: 8px;"
|
||||
"}";
|
||||
gtk_css_provider_load_from_data(pProvider, gtk_check_version(3, 20, 0) == nullptr ? data : olddata, -1, nullptr);
|
||||
gtk_style_context_add_provider(pButtonContext,
|
||||
GTK_STYLE_PROVIDER(pProvider),
|
||||
GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
|
||||
|
@@ -2081,15 +2081,36 @@ void GtkSalFrame::grabPointer( bool bGrab, bool bOwnerEvents )
|
||||
if (!m_pWindow)
|
||||
return;
|
||||
|
||||
GdkSeat* pSeat = gdk_display_get_default_seat(getGdkDisplay());
|
||||
#if GTK_CHECK_VERSION(3, 20, 0)
|
||||
if (gtk_check_version(3, 20, 0) == nullptr)
|
||||
{
|
||||
GdkSeat* pSeat = gdk_display_get_default_seat(getGdkDisplay());
|
||||
if (bGrab)
|
||||
{
|
||||
gdk_seat_grab(pSeat, widget_get_window(getMouseEventWidget()), GDK_SEAT_CAPABILITY_ALL_POINTING,
|
||||
bOwnerEvents, nullptr, nullptr, nullptr, nullptr);
|
||||
}
|
||||
else
|
||||
{
|
||||
gdk_seat_ungrab(pSeat);
|
||||
}
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
//else older gtk3
|
||||
const int nMask = (GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK);
|
||||
|
||||
GdkDeviceManager* pDeviceManager = gdk_display_get_device_manager(getGdkDisplay());
|
||||
GdkDevice* pPointer = gdk_device_manager_get_client_pointer(pDeviceManager);
|
||||
if (bGrab)
|
||||
{
|
||||
gdk_seat_grab(pSeat, widget_get_window(getMouseEventWidget()), GDK_SEAT_CAPABILITY_ALL_POINTING,
|
||||
bOwnerEvents, nullptr, nullptr, nullptr, nullptr);
|
||||
gdk_device_grab(pPointer, widget_get_window(getMouseEventWidget()), GDK_OWNERSHIP_NONE,
|
||||
bOwnerEvents, (GdkEventMask) nMask, m_pCurrentCursor, gtk_get_current_event_time());
|
||||
}
|
||||
else
|
||||
{
|
||||
gdk_seat_ungrab(pSeat);
|
||||
gdk_device_ungrab(pPointer, gtk_get_current_event_time());
|
||||
}
|
||||
}
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user