Removed event compression option - not working

disable event compression premanently
presentation
Andreas Butti 7 years ago
parent 1c91f80ef4
commit 021ea95020
  1. 2
      src/control/Control.cpp
  2. 29
      src/control/settings/Settings.cpp
  3. 8
      src/control/settings/Settings.h
  4. 19
      src/gui/XournalView.cpp
  5. 2
      src/gui/XournalView.h

@ -1896,8 +1896,6 @@ void Control::showSettings()
enableAutosave(settings->isAutosaveEnabled());
getWindow()->getXournal()->setEventCompression(settings->isEventCompression());
this->zoom->setZoom100(settings->getDisplayDpi() / 72.0);
getWindow()->getXournal()->getTouchHelper()->reload();

@ -103,8 +103,6 @@ void Settings::loadDefault()
this->backgroundColor = 0xDCDAD5;
this->eventCompression = true;
this->pageTemplate = "xoj/template\ncopyLastPageSettings=true\nsize=595.275591x841.889764\nbackgroundType=lined\nbackgroundColor=#ffffff\n";
inTransaction = false;
@ -300,10 +298,6 @@ void Settings::parseItem(xmlDocPtr doc, xmlNodePtr cur)
{
this->widthMaximumMultiplier = g_ascii_strtod((const char*) value, NULL);
}
else if (xmlStrcmp(name, (const xmlChar*) "eventCompression") == 0)
{
this->eventCompression = xmlStrcmp(value, (const xmlChar*) "true") ? false : true;
}
else if (xmlStrcmp(name, (const xmlChar*) "sidebarOnRight") == 0)
{
this->sidebarOnRight = xmlStrcmp(value, (const xmlChar*) "true") ? false : true;
@ -730,8 +724,6 @@ void Settings::save()
WRITE_DOUBLE_PROP(widthMaximumMultiplier);
WRITE_COMMENT("The multiplier for the pressure sensitivity of the pen");
WRITE_BOOL_PROP(eventCompression);
WRITE_COMMENT("Config for new pages");
WRITE_STRING_PROP(pageTemplate);
@ -1041,27 +1033,6 @@ void Settings::setDefaultSaveName(string name)
save();
}
bool Settings::isEventCompression()
{
XOJ_CHECK_TYPE(Settings);
return this->eventCompression;
}
void Settings::setEventCompression(bool enabled)
{
XOJ_CHECK_TYPE(Settings);
if (this->eventCompression == enabled)
{
return;
}
this->eventCompression = enabled;
save();
}
string Settings::getPageTemplate()
{
XOJ_CHECK_TYPE(Settings);

@ -260,9 +260,6 @@ public:
int getPdfPageCacheSize();
void setPdfPageCacheSize(int size);
bool isEventCompression();
void setEventCompression(bool enabled);
string getPageTemplate();
void setPageTemplate(string pageTemplate);
@ -502,11 +499,6 @@ private:
*/
int backgroundColor;
/**
* Whether event compression should be enabled
*/
bool eventCompression;
/**
* Page template String
*/

@ -348,7 +348,15 @@ void XournalView::onRealized(GtkWidget* widget, XournalView* view)
{
XOJ_CHECK_TYPE_OBJ(view, XournalView);
view->setEventCompression(view->getControl()->getSettings()->isEventCompression());
// Disable event compression
if (gtk_widget_get_realized(view->getWidget()))
{
gdk_window_set_event_compression(gtk_widget_get_window(view->getWidget()), false);
}
else
{
g_warning("could not disable event compression");
}
}
// send the focus back to the appropriate widget
@ -862,15 +870,6 @@ void XournalView::repaintSelection(bool evenWithoutSelection)
gtk_widget_queue_draw(this->widget);
}
void XournalView::setEventCompression(gboolean enable)
{
// Enable this when gdk is new enough for the compression feature.
if (gtk_widget_get_realized(getWidget()))
{
gdk_window_set_event_compression(gtk_widget_get_window(getWidget()), enable);
}
}
void XournalView::layoutPages()
{
XOJ_CHECK_TYPE(XournalView);

@ -88,8 +88,6 @@ public:
void deleteSelection(EditSelection* sel = NULL);
void repaintSelection(bool evenWithoutSelection = false);
void setEventCompression(gboolean enable);
TextEditor* getTextEditor();
ArrayIterator<XojPageView*> pageViewIterator();
Control* getControl();

Loading…
Cancel
Save